Commit Graph

13200 Commits (9f757290f84da3104103c00d986382151319b2a8)

Author SHA1 Message Date
Ben Johnson c36817fffc
Fix retain/release hang issues. 2017-12-06 09:09:41 -07:00
Ben Johnson f9807a635c
Merge branch 'er-tsi-index-part' of https://github.com/influxdata/influxdb into er-tsi-index-part 2017-12-05 12:10:17 -07:00
Ben Johnson 493c1ed0d1
inmem tests passing. 2017-12-05 10:49:58 -07:00
Edd Robinson ca1cfe4b81 Refactor File mock 2017-12-05 16:17:15 +00:00
Ben Johnson f5f85d65f9
Fixing more tests. 2017-12-04 10:29:04 -07:00
Ben Johnson e0df47d54f
Fixing up tests. 2017-12-02 16:52:34 -07:00
Jason Wilder fd11e200c8
Merge pull request #9185 from influxdata/jw-deletes
Delete fixes
2017-11-30 15:41:50 -07:00
Jason Wilder 909a2fb6cc Fix deletes removing index for invalid time ranges
If a delete for a time that does not exist was run, we would not
remove the series key from the slice of series to remove from the
index.

This could be triggered by running somethin like "delete from cpu where
time = 0" and if there was no data at time 0, the series would still
be removed from the index.
2017-11-30 15:01:01 -07:00
Jason Wilder b6096414c2 Fix compactions aborting early
If there were many individual deletes to a series that ended up
deleting every value in the block and the tombstone timestamps
were not contigous, it was possible for the TSMKeyIterator to
return false for Next incorrectly.  This causes the compaction to
drop any remaining data in the file.

Normally, if all the data is deleted via tombstones, we remove the
whole key from the TSM index.  In this case, we're not able to determine
that the key is fully deleted until the block is decode and tombstones
are applied.

This changes the TSMKeyIterator to detect this condition and continue
to the next key instead of aborting.
2017-11-30 14:38:09 -07:00
Edd Robinson 68de5ca24f 🔥 little endianness 2017-11-30 17:57:16 +00:00
Edd Robinson a46f186118 Tweak constants 2017-11-30 17:23:03 +00:00
Mark Rushakoff 48217793ac
Merge pull request #9182 from influxdata/mr-changelog-fix
Fix incorrect link in CHANGELOG
2017-11-30 08:44:02 -08:00
Edd Robinson 1e891b5fbc Change logging level 2017-11-30 14:08:44 +00:00
Ben Johnson f1cf55ca99
Merge branch 'er-tsi-index-part' of https://github.com/influxdata/influxdb into er-tsi-index-part 2017-11-30 05:45:40 -07:00
Jonathan A. Sternberg 95e1e3b332
Merge pull request #8015 from influxdata/js-code-coverage
Expand code coverage for undercovered packages
2017-11-29 19:30:47 -06:00
Mark Rushakoff d8d0d2440a Fix incorrect link in CHANGELOG 2017-11-29 16:25:01 -08:00
Andrew Hare 4531165ce2
Merge pull request #9181 from influxdata/amh-import-compaction
Schedule a full compaction after a successful import
2017-11-29 15:30:07 -07:00
Andrew Hare 0f937065c1 Update CHANGELOG 2017-11-29 13:52:04 -07:00
Andrew Hare 761a8f8bec Schedule a full compaction after a successful import 2017-11-29 13:50:38 -07:00
Jason Wilder a520ed99ee
Merge pull request #9179 from influxdata/jw-delete-range
Fix removing series from index
2017-11-29 11:58:10 -07:00
Jason Wilder 5cf7d52694 Ensure series keys are sorted
The Measurement added series keys from a map where the iteration
order is non-deterministic.  The keys should be returned in sorted
order.
2017-11-29 11:24:10 -07:00
Ben Johnson ca09f18e65
intermediate: tsdb compile 2017-11-29 11:20:18 -07:00
Jason Wilder 8633e38549 Fix removing series from index
The loop to check if a series still exists in a TSM file was wrong
in that it 1) exited early after one iteration and 2) had an off
by one error that causes the wrong series to be marked as existing.

This fixes both of these cases which can cause the index to become
inconsistent with the data store on disk.
2017-11-29 10:45:04 -07:00
Edd Robinson c2f7f0f430
Merge pull request #8491 from influxdata/er-tsi-restore
Add support for TSI shard streaming and shard size
2017-11-29 15:40:52 +00:00
Jason Wilder df96d3064a
Merge pull request #9173 from influxdata/jw-cache-delete-sort
Fix Cache.DeleteRange not deleting all data
2017-11-28 17:33:32 -07:00
Andrew Hare 7b705732b4
Merge pull request #8971 from influxdata/ah-truncate-shards
Create a command to truncated shard groups
2017-11-28 17:26:35 -07:00
Andrew Hare d7e328050c
Merge branch 'master' into ah-truncate-shards 2017-11-28 17:25:31 -07:00
Andrew Hare 1d9a765084
Merge pull request #8845 from influxdata/amh-8789
Fix CLI to allow quoted database names
2017-11-28 17:24:24 -07:00
Andrew Hare 28ec02a7c1
Merge branch 'master' into amh-8789 2017-11-28 17:05:42 -07:00
Jason Wilder 887bca752e Skip flaky test on windows 2017-11-28 16:43:45 -07:00
Jonathan A. Sternberg b775ad3d5d Expand unit test code coverage in services that were undercovered
This expands code coverage for the following packages:
* monitor (3.5% -> 86.9%)
* services/precreator (31.6% -> 83.8%)
* services/retention (83.0% -> 84.9%)
* services/snapshotter (0.0% -> 82.1%)
* tcp (48.7% -> 60.0%)
2017-11-28 15:44:35 -06:00
Jonathan A. Sternberg d83b123b4f
Merge pull request #9145 from influxdata/js-9144-multiple-nested-distinct-calls
Fix query compilation so multiple nested distinct calls is allowable
2017-11-28 12:46:47 -06:00
Edd Robinson 81976bca59 Refactor based on new design 2017-11-28 17:54:29 +00:00
Jason Wilder e62f6d7cdf Fix Cache.DeleteRange not deleting all data
This fixes a regression in the Cache introduced in ca40c1ad3c where
not all the values in the cache entry would be removed.  Previously,
calling Exclude did not require the values to be sorted.  The change
in ca40c1ad3c relies on the values being sorted so it was possible for
it to find the wrong indexes in when calling FindRange and leave some
data that should be deleted.

Fixes #9161
2017-11-28 10:39:21 -07:00
Jonathan A. Sternberg db60a83d5a Fix query compilation so multiple nested distinct calls is allowable
When refactoring the query engine, I thought calling
`count(distinct(value))` multiple times was disallowed and so the
refactor made it so that wasn't possible.

It turns out that this pattern is allowed because since the distinct is
nested, it is aggregated anyway and can be combined with other
aggregates.

This removes the erroneously placed restriction.
2017-11-28 11:09:32 -06:00
Edd Robinson b10249a9b3 Fix rebase 2017-11-28 15:58:35 +00:00
Edd Robinson 041a3837be Ensure index can track fields 2017-11-28 15:57:03 +00:00
Edd Robinson 38e0dd695f Allow concurrent access to Engine Index 2017-11-28 15:57:03 +00:00
Edd Robinson abae36f992 Ensure all index fields set 2017-11-28 15:57:02 +00:00
Edd Robinson 368420c670 Fix test due to index changes 2017-11-28 15:57:02 +00:00
Edd Robinson 67c67aeb34 Update test for Windows 2017-11-28 15:57:02 +00:00
Edd Robinson 12a2ff7fac Add support for TSI shard streaming and shard size
This commit firstly ensures that a shard's size on disk is accurately
reported when using the tsi1 index, by including the on-disk size of the
tsi1 index in the calculation.

Secondly, this commit add support for shard streaming/copying when using
the tsi1 index. Prior to this, a tsi1 index would not be correctly
restored when streaming shards.
2017-11-28 15:57:02 +00:00
Jason Wilder 5032a802d6
Merge pull request #9168 from influxdata/jw-delete-sort
Ensure series keys are sorted before searching
2017-11-28 08:51:38 -07:00
Jason Wilder 5a45059f5b Fix Panic in TestServer_ConcurrentPointsWriter_Subscribe
If the server is closed an write is sent, the LocalServer panics.
2017-11-28 08:24:28 -07:00
Jonathan A. Sternberg 0b18a6faf4
Merge pull request #9166 from influxdata/js-code-cleanup
Group the "strings" import with the other stdlib imports
2017-11-28 09:07:24 -05:00
Jason Wilder b59858e529 Ensure series keys are sorted before searching
The Cache.ApplyEntryFn iterates keys according to the partitions
and hashed values.  This can cause the deleteKeys slice to contain
unsorted keys when deleting series.  The code uses a binary search
on this slice later on and this can fail to detect that the series
should still exists.  The series is then removed from the index
even though it has data still.

Fixes #9116
2017-11-27 17:06:03 -07:00
Jonathan A. Sternberg c59c4b231e
Merge pull request #9163 from influxdata/js-merge-iterator-close-race-condition
Fix race condition in the merge iterator close method
2017-11-27 18:26:47 -05:00
Jonathan A. Sternberg 00ab411a6c Group the "strings" import with the other stdlib imports 2017-11-27 17:10:28 -06:00
Jonathan A. Sternberg a73c3a1965 Fix race condition in the merge iterator close method
If the close happens when next is being called, it can result in a race
condition where the current iterator gets set to nil after the initial
check.

This also fixes the finalizer so it runs the close method in a goroutine
instead of running it by itself. This is because all finalizers run on
the same goroutine so a close that takes a long time can cause a backup
for all finalizers. This also removes the redundant call to
`runtime.SetFinalizer` from the finalizer itself because a finalizer,
when called, has already cleared itself.
2017-11-27 16:55:41 -06:00
Stuart Carnie f23dc1515e
Merge pull request #9162 from influxdata/sgc-walkkeys
improve startup performance
2017-11-27 13:46:58 -07:00