Commit Graph

13123 Commits (d295f306866c0e78981e85bd265e6e19fd046156)

Author SHA1 Message Date
Ben Johnson d295f30686 Remove series id check during deletion. 2018-01-15 12:00:31 +00:00
Ben Johnson 1c4ab05c7e Add fast TSI MeasurementHasSeries() check. 2018-01-15 12:00:30 +00:00
Ben Johnson b07e41fa7f Fix partition series set building. 2018-01-15 12:00:30 +00:00
Ben Johnson 9a15130a4c Persist TSI tombstones. 2018-01-15 12:00:30 +00:00
Ben Johnson 69757ccd15 Fix partition series set building. 2018-01-15 12:00:30 +00:00
Edd Robinson 3d153e3808 Don't creation series in partition if none assigned 2018-01-15 12:00:30 +00:00
Edd Robinson 4913f2b4ac Refactor test Index/Series file with correct open 2018-01-15 12:00:30 +00:00
Edd Robinson 96d55c4471 Fix reference bug 2018-01-15 12:00:30 +00:00
Edd Robinson bb6bfad5ea Ensure inmem index updated properly 2018-01-15 12:00:30 +00:00
Edd Robinson b9d0a39131 Skip empty series keys 2018-01-15 12:00:30 +00:00
Edd Robinson 7f244cb29f Use models series key for partition allocation
There are two series key formats: the `models` package format, which is
also line-protocol format, and the `tsdb` package format, which is used
by the series file when serialising series keys.

When writing to a series, rather than taking a `models` format key from
the `coordinator` package and then converting it to a `tsdb` package
format, it would be cheaper to keep the key in the `models` format
before hashing it to determine which partition the key lives in.
2018-01-15 12:00:30 +00:00
Edd Robinson a4bef3a4bc Refactoring delete tests 2018-01-15 12:00:30 +00:00
Edd Robinson 74481b9415 Fix shard tests 2018-01-15 12:00:30 +00:00
Edd Robinson b0e6aeb64c Add some series file testing 2018-01-15 12:00:30 +00:00
Jason Wilder ba9a5af7eb Mark series deleted in series file
This commit adds the ability to correctly mark a series as deleted in
the global series file. Whenever a shard engine determines that a series
should be deleted, it checks with each shard's bitset for series that
are to be deleted and are no longer contained in any shard-local
bitsets.

These series are then removed from the series file.
2018-01-15 12:00:30 +00:00
Edd Robinson cd0c420dce Add more random test cases 2018-01-15 12:00:30 +00:00
Edd Robinson d659d23e26 Add specific failing test cases 2018-01-15 12:00:30 +00:00
Edd Robinson e2e0581b12 Add randomised deletion test
This commits adds a randomised deletion test, which aims to test the
correctness of deletions and drops in the index and series file.

The test works by maintaining its own index of points, series and
measurements, tracking the presence or absence or series.

There are four commands that can be randomly executed:

  - insert a series at a random time
  - drop an entire measurement
  - drop an entire series
  - delete series across a time range

After every invocation of one of these commands, `SHOW SERIES` is
executed on the server, and the results are compared to what the
test's series tracker believes should be present. If the results
differ then the test fails.

On failure, the last 100 queries executed, as well as the series
we expected, and the series returned by `SHOW SERIES`, are returned.
2018-01-15 12:00:30 +00:00
Edd Robinson 286c8f4c09 Return to original DELETE/DROP SERIES semantics
This reverts commit 59afd8cc90.
2018-01-15 12:00:30 +00:00
Jason Wilder 2169ad680e
Merge pull request #9311 from influxdata/jw-delete-error
Don't return error for non-existent series file
2018-01-14 17:24:17 -07:00
Jason Wilder 874d5839da Don't return error for non-existent series file
When dropping series, if the series file does not exists we returned
and error.  This breaks compatibility with prior versions that would
not return an error if the series do not exists.
2018-01-14 12:53:26 -07:00
Jason Wilder 9418d373d6
Merge pull request #9308 from influxdata/jw-series-file-retain
Ensure series file is not closed while in use
2018-01-12 17:30:34 -07:00
Jason Wilder 5d1f76192a Ensure series file is not closed while in use 2018-01-12 16:58:33 -07:00
Jason Wilder 1abe176a68
Merge pull request #9305 from influxdata/jw-compact-disable
Fix TestEngine_DisableEnableCompactions_Concurrent hang
2018-01-11 21:28:05 -07:00
Jason Wilder 72910b6bf0 Don't clear partitions on close
Since partitions slice is not protected under a lock, setting it to
nil while closing causes a race if concurrent calls are accessing
the partitions slice elsewhere.  Since partitions do handle
concurrency and Open resets the slice, just leave it as it after
closing.
2018-01-11 15:46:38 -07:00
Jason Wilder a4d13c7098 Update TestIndex_SeriesIDSet
The series ids are no longer lower than 4 so this test will always
fail.
2018-01-11 13:49:50 -07:00
Jason Wilder c2cbd14e09 Fix TestEngine_DisableEnableCompactions_Concurrent hang
This test could hang due to an existing race that is still not fixed.
The snapshot and level compaction goroutines woule end up waiting on
the wrong channel to be closed so whey would never exit.
2018-01-11 11:58:20 -07:00
Ben Johnson d610a79487
Merge pull request #9295 from influxdata/partition-series-file
Partition series file
2018-01-11 08:45:18 -07:00
Edd Robinson 20dcd2d746
Merge pull request #9301 from influxdata/er-series-id-track
Track series IDs at a per-shard level
2018-01-11 12:34:27 +00:00
Edd Robinson ecef790574 Update timeout on test 2018-01-11 11:41:30 +00:00
Edd Robinson ed8b9925c8 Comment update 2018-01-11 01:01:54 +00:00
Edd Robinson e2262d3e8e Implement series id tracking in TSI index 2018-01-11 01:01:54 +00:00
Edd Robinson e610e7c21d Track undeleted series IDs per-shard with inmem
This commit adds a bitset into each shard's in-memory index, to be used to
track undeleted series ids. Currently tsi1 support is not implemented.

When new series are added to the shard, the series id is added
to the bitset. When series are deleted from the shard, the series
ids are removed from the bitset.

Becasue each shard shares the same inmem index reference, the bitset
is stored in the `ShardIndex`, which is local to each shard, and then
different references are passed into the shared `Index` object, depending
on which shard is writing the series.
2018-01-11 01:01:54 +00:00
Edd Robinson e6f3aa107a Move SeriesSet to tsdb.SeriesIDSet 2018-01-11 01:01:54 +00:00
Edd Robinson 35543e385f Tidy up 2018-01-11 01:01:54 +00:00
Ben Johnson 9bf45fcae0
Improve inmem insert performance with non-sequential series ids. 2018-01-10 13:08:16 -07:00
Adam 938db68198
Update restore functionality to run in online mode, consume Enterprise backup files. (#9207)
* Live Restore + Enterprise data format compatability

* Extended ImportData to import all DB's if no db name given

* Added a new enterprise data test, and backup command now prints the backup file paths at conclusion

* Added whole-system backup test

* Update to use protobuf in all enterprise data cases

* Update to test to do cross-testing with enterprise version

* incremental enterprise backup format support
2018-01-10 13:59:18 -05:00
Edd Robinson a4d48f95f3
Merge pull request #9303 from influxdata/er-store-race
Fix race in DeleteDatabase
2018-01-10 17:57:46 +00:00
Jason Wilder f15e2156f2
Merge pull request #9302 from influxdata/jw-cache-mem
Fix large memory spikes in cache
2018-01-10 08:35:38 -07:00
Ben Johnson ac4dc91c64
Partition series file. 2018-01-10 08:33:25 -07:00
Jason Wilder 92f86b1b8f Fix large memory spikes in cache
The cache defaulted to entry capacity size of 32.  This default
is fine for lower cardinalities, but causes big spikes in InUse
heap with higher cardinalities that can OOM the process.  Since
the hints had to be removed previously due to increased memory usage,
they are now completely removed.  For lower cardinalities, we do
grow the slice, but this has a small performance penalty compared
to the large memory usage/OOMs with larger cardinalities.
2018-01-10 07:56:46 -07:00
Edd Robinson 6eeecb477e Fix race in DeleteDatabase 2018-01-10 14:33:14 +00:00
Ben Johnson 3108eea330
Merge pull request #9291 from influxdata/bj-fix-series-file-delete
Fix series file removal after DROP DATABASE.
2018-01-08 13:20:02 -07:00
Ben Johnson fe2116a4fc
Fix series file removal after DROP DATABASE. 2018-01-08 11:40:06 -07:00
David Norton 1ea41b0dd6
Merge pull request #9287 from influxdata/dn-return-digest-size
fix #9286: return digest size
2018-01-08 13:30:56 -05:00
David Norton 1c452d83cb fix #9286: return digest size 2018-01-08 13:15:14 -05:00
Ben Johnson f2adaf68a7
Merge pull request #9288 from influxdata/bj-fix-stalled-series-file-compaction
Fix series file compaction stall.
2018-01-08 10:18:41 -07:00
Ben Johnson c0a46d2d3d
Fix series file compaction stall.
The series file compaction previously did not snapshot the max
offset before compacting and would keep compacting until it reached
the end of segment file. This caused more entries than expected into
the RHH map and this map gets exponentially slower as it gets close
to full.
2018-01-08 09:53:01 -07:00
Ben Johnson 88ce43a639
Merge pull request #9285 from influxdata/bj-series-file-windows
WIP: Close series file on database deletion.
2018-01-08 09:51:58 -07:00
Ben Johnson 6f32f15fd3
Add closed series file checks. 2018-01-08 09:11:29 -07:00