Commit Graph

11076 Commits (1f31e8b70778c80a1bbfca0e3437f52eb26c3e7a)

Author SHA1 Message Date
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
Jason Wilder 25508fa05f Add pool.Bytes for re-using byte slices
This adds a new pool type that allows byte slices
to be re-used across clients.  A sync.Pool can't be used in some
cases because the the slices not in use end up getting garbage
collected due to frequent GCs.
2016-09-26 12:19:15 -06:00
Jason Wilder ac9a7d520b Pre-allocated Points slice when parsing points
Over a longer period of writes, this allocation shows up quite
a bit in profiles since the slice needs to be resized frequently.

This scans the slice to count how many lines are going to be parsed
in order to pre-allocate the slice capacity.  It's slightly slower,
but creates less garbage in the long run.
2016-09-26 12:19:15 -06:00
Jason Wilder b3dd10ec20 Merge pull request #7312 from influxdata/jw-map-allocate
Reduce allocations in idsForExpr
2016-09-26 11:42:56 -06:00
Cory LaNou d533ebf184
update protobuf dependency 2016-09-26 12:34:25 -05:00
Cory LaNou 662b4b495c Merge pull request #7362 from influxdata/cjl-vet-fix
fix failing vet issue in test
2016-09-26 12:29:32 -05:00
Cory LaNou 4a2d23da4a
fix failing vet issue in test 2016-09-26 11:29:02 -05:00
Jason Wilder 8b354f7295 Update 1.0.1 changelog 2016-09-26 09:15:33 -06:00
Cory LaNou 33ce9fd11c Merge pull request #7327 from influxdata/cjl-export-wal
export wal files when exporting shard data
2016-09-26 09:40:24 -05:00
Jason Wilder 6671ef00f0 Reduce allocations in idsForExpr 2016-09-26 08:36:59 -06:00
Jason Wilder c2cfd63091 Avoid stat syscall when planning compactions
When the planner runs, it needs to determine if any files have tombstones.
The code to determine if a tombstone existed involved stating the .tombstone
file.  Since the planner runs very frequently when there are many shards, this
causea a lot of system calls that are unnecessary.

Instead, cache the results of the stats calls and only refresh them when we
haven't checked at least once or we write new tombstone data.

This also caches the results of the TSMReader.Stats call to avoid creating
garbage.
2016-09-24 15:53:28 -06:00
Cory LaNou 4f952ad483 export wal files when exporting shard data 2016-09-23 15:09:17 -05:00
joelegasse c2315b208c Merge pull request #7305 from influxdata/jl-udp-split
UDP Client: Split large points
2016-09-23 15:30:21 -04:00
Joe LeGasse 2cbd411a9a client: updated README for UDP point splitting 2016-09-23 15:13:40 -04:00
Joe LeGasse 0d2b339d7c models: Added AppendString, PointSize, and Round to Point
This change also updates the UDP client to take advantage of these
improvements, as well as some code review changes.
2016-09-23 13:22:30 -04:00
Joe LeGasse ee6816756a udp client: large points will now be split, if possible
The v2 UDP client will attempt to split points that exceed the
configured payload size. It will only do this for points that have a
timestamp specified.
2016-09-23 13:22:30 -04:00
Vladimir Sagan 86f3300a46 refactor conditions of udp write func 2016-09-23 13:22:30 -04:00
Vladimir Sagan a3da819552 UDP client refactoring 2016-09-23 13:22:30 -04:00
Vladimir Sagan 0e33af50a9 UDP client: write metrics splitting metrics into chunks 2016-09-23 13:22:30 -04:00