Commit Graph

7936 Commits (897a5effff7c802fcd356ddb338b379200107d7f)

Author SHA1 Message Date
Jason Wilder 5326ac4239 Fix go vet 2015-09-30 16:25:50 -06:00
Jason Wilder b826f8d6ac Remove zig zag encoding from timestamp encoder
Not needed since all timestamps will be sorted in ascending order.  Negatives
are not possible.
2015-09-30 16:25:50 -06:00
Paul Dix 01b5b9268e Fix compaction and multi-write bugs.
* Fix bug with locking when the interval completely covers or is totally inside another one.
* Fix bug with full compactions running when the index is actively being written to.
2015-09-30 16:39:27 -04:00
Philip O'Toole 83f0d9b829 Merge pull request #4278 from influxdb/error_marshalling
Fix cluster-level error marshalling
2015-09-30 13:18:51 -07:00
Philip O'Toole 591e33b1d8 Initial work, does not address issue 2015-09-30 11:58:42 -07:00
Jason Wilder c1accf7e59 Handle partial reads when loading WAL
If reading into fixed sized buffer using io.ReadFull, the func can
return io.ErrUnexpectedEOF if the read was short.  This was slipping
through the error handling causing the shard to fail to load.
2015-09-30 09:51:05 -06:00
Paul Dix 9b84a20dec Fix bugs with writing old data and compaction. 2015-09-30 11:48:26 -04:00
Jason Wilder c27de6fbb8 Add test with duplicate timestamps
Should not happen but makes sure that the same values are encoded
and decoded correctly.
2015-09-29 20:02:22 -06:00
Jason Wilder f29c4c8cf9 Add compressed string encoding
Uses snappy to compress multiple strings into a block
2015-09-29 20:02:22 -06:00
Paul Dix 4937ae8fbf Fix panic when data file has small index 2015-09-29 21:51:16 -04:00
Paul Dix 6c2bef6073 Add logging to pd1 2015-09-29 20:03:37 -04:00
Philip O'Toole 1daf665a1d influxdb user removed by purge
[ci skip]
2015-09-29 15:53:07 -07:00
Paul Dix 72fa3dd5a4 Update WAL to deduplicate values on Cursor query.
Added test and have failing section for single value encoding.
2015-09-29 16:17:58 -04:00
Ben Johnson a754462e20 Merge pull request #4264 from benbjohnson/map-fn
Refactor map functions to use list of values
2015-09-29 14:00:48 -06:00
Ben Johnson 343dd23ee7 refactor map functions to use list of values
This commit changes `tsdb.mapFunc` to use `tsdb.MapInput` instead
of an iterator. This will make it easier and faster to pass blocks
of values from the new storage engine into the engine.
2015-09-29 14:00:33 -06:00
Philip O'Toole f79377b488 Merge pull request #4266 from lenko-d/make_code_golintable-#4098
Changes to make the cluster sub package golint-able
2015-09-29 10:49:56 -07:00
Jason Wilder c0eba04d9d Rename float encoding tests 2015-09-29 10:47:35 -06:00
Jason Wilder 24922181c6 Add documentation about compression 2015-09-29 10:46:19 -06:00
Jason Wilder 3ea1b5e795 Fix deadlock in pd1_test.go
The defer tx.Rollback() tries to free the queryLock but the defer e.Cleanup() runs
before it and tries to take a write lock on the query lock (which blocks) and prevents
tx.Rollback() from acquring the read lock.
2015-09-29 10:44:24 -06:00
Jason Wilder 3cbd4b198f Update simple8b api usage 2015-09-29 09:39:01 -06:00
Jason Wilder 6c0f53dfe4 Add a compressed boolean encoding
Packs booleans into bytes using 1 bit per value.
2015-09-29 09:39:01 -06:00
Jason Wilder 7fe9673bbc Keep track of the type of the block encoded
Allowes decode to decode an arbitrary block correctly.
2015-09-29 09:39:00 -06:00
Jason Wilder 8d2ecb5df5 Remove unnecessary allocations from int64 decoder
The decoder was creating a large slice and decoding all values when
instead, it could decode one packed value as needed.
2015-09-29 09:39:00 -06:00
Jason Wilder 5a49e1a04b Add test assertions for time encoding type 2015-09-29 09:39:00 -06:00
Jason Wilder 071739b960 Fix run length encoding check
Values were run length encoded even when they should not have been
2015-09-29 09:39:00 -06:00
Jason Wilder 8ce3d7564d Reduce memory allocations
Converting between different encoders is wasting a lot of memory allocating different
typed slices.
2015-09-29 09:39:00 -06:00
Jason Wilder fce01a2466 Use zigzag encoding for timestamp deltas
Previously were using a frame of reference approach where we would
transform the (possibly negative) deltas into positive values from
the minimum.  That required an extra pass over the values as well
as a large slice allocation so we could encode the originals in uncompressed
form if they were too large.

This switches the encoding to use zigzag encoding for the deltas which
removes the extra slice allocation as well as the extra loops.

Improves encoding performane by ~4x.
2015-09-29 09:39:00 -06:00
Jason Wilder bf74c7cf86 Add int64 compression
This is using zig zag encoding to convert int64 to uint64s and then using simple8b
to compress them, falling back to uncompressed if the value exceeds 1 << 60.  A
patched encoding scheme would likely be better in general but this provides decent
compression for integers that are not at the ends of the int64 range.
2015-09-29 09:39:00 -06:00
Jason Wilder 19877a6d85 Add time and float compression
Time compression uses an adaptive approach using delta-encoding,
frame-of-reference, run length encoding as well as compressed integer
encoding.

Float compression uses an implementation of the Gorilla paper encoding
for timestamps based on XOR deltas and leading and trailing null suppression.
2015-09-29 09:39:00 -06:00
Jason Wilder 57b0a276da Allow influx_stress to use small data sizes
Prevents a panics when response size is less than 100.  Also allows
data to be posted when it is less than the batch size.
2015-09-29 09:39:00 -06:00
Jason Wilder 938bae97d4 Fix go vet errors 2015-09-29 09:39:00 -06:00
Jason Wilder 4fcc61c766 Ensure we have files when iterating in cursor
Prevents index out of bounds panic
2015-09-29 09:39:00 -06:00
Paul Dix ca2a13c76e Update stress to use second timestamps and less random floats. 2015-09-29 11:37:28 -04:00
Paul Dix 9031804dcc Update tests to use transactions. Add test for single series 10k points. 2015-09-29 11:27:02 -04:00
Paul Dix eb24c0daa6 Add recover to maintenance. Change snapshot writer to not use bolt on shard. 2015-09-29 10:56:11 -04:00
Paul Dix 9e630f8b8b Ensure data files can't be deleted while query is running.
Also ensure that queries don't try to use files that have been deleted.
2015-09-29 08:59:25 -04:00
Paul Dix 68d03e8ae0 Make compaction run at most at set duration. 2015-09-29 08:35:05 -04:00
Mint 9c6da2417e Fixed comments.
Issue: Enable golint on the code base #4098 (changes only for the cluster subpackage)

- [ ] CHANGELOG.md updated
- [X] Rebased/mergable
- [X] Tests pass
- [X] Sign [CLA](http://influxdb.com/community/cla.html) (if not already signed)
2015-09-28 23:38:21 -05:00
Philip O'Toole 82f866702a Remove obsolete comment 2015-09-28 20:56:43 -07:00
Paul Dix 8444e0546d Add PerformMaintenance to store for flushes and compactions.
Also fixed shard to work again with b1 and bz1 engines.
2015-09-28 22:50:26 -04:00
Mint 3cbc1936e5 Changes to make the cluster sub package golint-able
Issue: Enable golint on the code base #4098
2015-09-28 21:40:58 -05:00
Philip O'Toole a196644167 Merge pull request #4265 from influxdb/hh_stats
Add statistics for hinted handoff
2015-09-28 19:16:06 -07:00
Philip O'Toole 17cc2220b8 Update CHANGELOG 2015-09-28 18:39:42 -07:00
Philip O'Toole 235714755c HH processor-level stats
This change maintains stats on a per-shard and per-node basis.
2015-09-28 18:39:39 -07:00
Philip O'Toole 14db3ce9f5 Add service-level stats for hinted-handoff 2015-09-28 18:08:35 -07:00
Paul Dix f1ba618b23 Fix wal flushing, compacting, and write lock 2015-09-28 21:04:02 -04:00
Philip O'Toole e9a41e8c01 Factor out DESCRIPTION in packaging script 2015-09-28 17:43:54 -07:00
Philip O'Toole c5a82e062b Merge pull request #4262 from influxdb/udp_rp
Allow configuration of UDP retention policy
2015-09-28 15:30:08 -07:00
Philip O'Toole a196d3663a Allow configuration of UDP retention policy
Fixes issue #4529
2015-09-28 15:17:56 -07:00
Philip O'Toole 0697f01f8e Fix minor bug in packaging script
Thanks to @fg2it for the report.

[ci skip]
2015-09-28 15:09:17 -07:00