Jason Wilder
750c8b3932
Reduce lock contention in cache.Values
...
The cache read lock was held for the whole duration of the call when it
only needs to be held at the beginning since entries have their
own locks.
2016-10-03 10:21:54 -06:00
Jason Wilder
1b462312a9
Re-use decoder pools
...
The decoders were held onto each iterator to avoid creating them all
the time. Some of them have use quite a bit of memory so they can
be expensive to create when querying across many series.
Intead, more them to a re-usable pool where we create the minimum that
could active be in use. This reduces garbage as well as makes the iterators
less expensive to create.
2016-10-03 10:21:54 -06:00
Jason Wilder
f727effd7f
Merge pull request #7385 from influxdata/jw-query-allocs
...
Reduce query planning allocations
2016-10-03 09:08:36 -06:00
Jason Wilder
656fc62dbb
Merge pull request #7397 from influxdata/jw-7391
...
Fix decoding RLE integer blocks with negative deltas
2016-10-03 08:24:12 -06:00
Edd Robinson
2489e74c2f
Merge pull request #7387 from influxdata/er-pprof
...
Ensure pprof-enabled config option is respected
2016-10-03 11:05:30 +01:00
Jason Wilder
a15a416eaa
Fix decoding RLE integer blocks with negative deltas
...
Integer blocks that were run length encoded could produce the wrong
value when read back out because the deltas were not zig zag decoded
before scaling the final value. If the deltas were negative, as would
be seen in a counter that decrements by a constant value, the results
would be random with som negative and positive values.
Fixes #7391
2016-10-02 23:51:29 -06:00
Edd Robinson
537316eb7b
Ensure pprof-enabled config option is respected
2016-09-30 18:41:38 +01:00
Jason Wilder
68dd312bb1
Reduce allocations when calculating tagsets
...
The TagSets function was creating a lot of intermediate maps and
slices to calculate the sorted tag sets. It first creates a map
to group tag sets with their series, it then created an equally
sized slice of the tag keys and sorted then. Finally, it created
a new slice and added the tag sets in the original map by the ordering
of the sorted keys. It was also recreating the tags map multiple time
creating extra garbage in the loop.
This simplifies the code to create one map for grouping and than adding
the distinct sets to a slice which is then sorted. It also fixes the
multple tag maps getting created.
2016-09-29 16:02:29 -06:00
Jason Wilder
a3fd12198e
Avoid extra allocations when evalating binary expressions
2016-09-29 13:18:38 -06:00
Mark Rushakoff
11cf759652
Merge pull request #7383 from influxdata/mr-shard-stats-walpath-tag
...
Add walPath tag to shard stats
2016-09-29 11:01:40 -07:00
Mark Rushakoff
97c2f6f5c1
Add walPath tag to shard stats
...
Without the WAL path as a tag, the diskBytes field looked like it was
reporting the size of the data directory incorrectly.
Fixes #7382 .
2016-09-29 10:19:11 -07:00
Mark Rushakoff
97ea1cd32d
Merge pull request #7384 from influxdata/mr-appveyor-go17
...
Use built-in Go 1.7 in Appveyor
2016-09-29 10:16:59 -07:00
Mark Rushakoff
24de4ca3f2
Use built-in Go 1.7 in Appveyor
...
See available versions of Go at
https://www.appveyor.com/docs/installed-software/#go
2016-09-29 10:07:29 -07:00
Jason Wilder
b42a2316b1
Merge pull request #7324 from miry/go1.7.1
...
Use go 1.7.1 for testing
2016-09-29 09:40:55 -06:00
Jason Wilder
6e7da3d24a
Merge pull request #7379 from influxdata/jw-meta-clone
...
Don't clone the cached meta store
2016-09-28 11:52:43 -06:00
Jason Wilder
bc00490b92
Don't clone the cached meta store
...
The cacheData is read-only and does not need to be cloned. Cloning
it for read operations can be expensive with lots of shards/database/RPs/etc.
2016-09-28 10:35:59 -06:00
Jason Wilder
dcb65865a2
Merge pull request #7376 from influxdata/jw-revert
...
Revert re-using byte slices during compactions
2016-09-28 08:24:35 -06:00
joelegasse
87ecd97e7b
Merge pull request #7371 from influxdata/2016-09-27--rw--use-gotos-for-encoding-cleanup
...
Gotos to simplify uses of the new encoder pools.
2016-09-28 08:57:33 -04:00
Jason Wilder
1755f20d2a
Revent re-using byte slices during compactions
...
This is causing a fatal error: fault panic when packing blocks.
2016-09-27 23:41:06 -06:00
Jonathan A. Sternberg
e22e33d5fd
Merge pull request #7374 from influxdata/merge-from-1.0.1
...
Merge tag 'v1.0.1'
2016-09-27 20:32:58 -05:00
Jonathan A. Sternberg
3afdf3cd94
Merge tag 'v1.0.1'
2016-09-27 17:53:33 -05:00
Jason Wilder
777407ad0c
Merge pull request #7373 from influxdata/2016-09-27--rw--reduce-allocs-by-using-encoder-reset
...
Use encoder reset to save on allocs.
2016-09-27 15:21:20 -06:00
rw
c3fc87b619
Remove dangling named return value.
2016-09-27 14:18:32 -07:00
rw
fcd425c8c6
Incorporate style feedback from Joe.
2016-09-27 14:07:06 -07:00
rw
47c1c6763c
Use encoder reset to save on allocs.
2016-09-27 13:31:35 -07:00
Jonathan A. Sternberg
6660bf5cba
Removing bad changelog entries added in 39ade11
2016-09-27 15:18:57 -05:00
rw
9429a2f96a
Gotos to simplify uses of the new encoder pools.
...
For maintainability.
2016-09-27 11:47:25 -07:00
joelegasse
1eda0277a7
Merge pull request #7365 from influxdata/jl-shardgroup-sort
...
Stablize the sorting of meta.ShardGroupInfos
2016-09-27 11:02:47 -04:00
Jason Wilder
5367372253
Merge pull request #7364 from influxdata/2016-09-26-fix-data-race-in-write-path
...
Fix data race in *tsdb.Shard write path.
2016-09-26 18:34:19 -06:00
Jason Wilder
e707b07946
Merge pull request #7367 from influxdata/2016-09-26-fix-varint-encoder-segfault
...
Fix off-by-one error that could panic.
2016-09-26 18:30:01 -06:00
rw
f131d3cc77
Fix off-by-one error that could panic.
2016-09-26 17:03:03 -07:00
rw
3e0d3be461
Use pre-existing function.
2016-09-26 13:12:10 -07:00
rw
bea010b5f3
Fix data race in *tsdb.Shard write path.
...
Ensure that the Shard's Index is read-locked before calculating the
count of its constituent series.
2016-09-26 12:42:35 -07:00
joelegasse
bc4282ad99
Merge pull request #7347 from influxdata/2016-09-22-zero-alloc-strconv-parse-numbers
...
Zero-alloc wrappers for strconv.Parse{Int,Float}. Thanks @rw
2016-09-26 15:33:30 -04:00
joelegasse
611e413791
Merge pull request #7345 from influxdata/2016-09-22-zero-alloc-fnv64a
...
Implement and use zero-alloc FNV64a. Thanks @rw
2016-09-26 15:15:10 -04:00
joelegasse
a17d095aae
Merge pull request #7350 from influxdata/2016-09-22-reduce-allocs-in-validate-series-and-fields
...
Remove a few short-lived string allocs. Thanks @rw
2016-09-26 15:01:53 -04:00
rw
3155ff2a27
Implement and use zero-alloc FNV64a.
...
+ Remove a heap alloc in (Point).HashID() and (Row).tagsHash()
(According to `-gcflags -m`).
+ Direct port from the stdlib.
+ Fuzz test for equivalence to stdlib version.
+ Save one alloc per line when writing with the bulk protocol.
2016-09-26 11:43:27 -07:00
rw
16c3bd2093
Happy-path zero-alloc num parsing fuzz tests.
2016-09-26 11:41:31 -07:00
rw
6906fe7240
Zero-alloc wrappers for strconv.Parse{Int,Float}
...
+ Reduces short-lived heap allocs during value parsing.
+ Fuzz tests to verify equivalence to stdlib functions.
2016-09-26 11:41:31 -07:00
Cory LaNou
e93730759f
Merge pull request #7363 from influxdata/cjl-update-godeps-protobuf
...
update protobuf dependency
2016-09-26 13:40:09 -05:00
Jason Wilder
4b5d989905
Merge pull request #7335 from influxdata/jw-tsm-syscalls
...
Avoid stat syscall when planning compactions
2016-09-26 12:30:05 -06:00
Jason Wilder
6a604c2928
Merge pull request #7348 from influxdata/jw-write-allocs
...
Reduce allocations in write path/compactions
2016-09-26 12:29:31 -06:00
rw
68c2212aac
Shorten name of static-lifetime string var.
2016-09-26 11:26:24 -07:00
rw
02c86ea9db
Remove unnecessary string constant.
2016-09-26 11:25:04 -07:00
Jason Wilder
139ef8062e
Simplify encoder buffer usage
2016-09-26 12:19:16 -06:00
Jason Wilder
f632b41f6a
Update godoc
2016-09-26 12:19:15 -06:00
Jason Wilder
658149a6ff
Removed commented out code
2016-09-26 12:19:15 -06:00
Jason Wilder
7f96d78b79
Make encoder re-usable
...
This allows encoders to be re-used and maintained in a pool to
avoid allocating new ones on every compactions and write of an encoded
block. The pool used is not a sync.Pool to ensure that the encoders
will not be garbage collected.
2016-09-26 12:19:15 -06:00
Jason Wilder
0401527093
Pre-allocate cache store and entries
...
These were not sized so they always had to be grown causing
garbage to be created.
2016-09-26 12:19:15 -06:00
Jason Wilder
730ceeea46
Re-used allocated byte slices during compactions
2016-09-26 12:19:15 -06:00