Commit Graph

150 Commits (733d8428126d77a84c92f768114e3a98ce891c48)

Author SHA1 Message Date
Jonathan A. Sternberg ca7cc021ee Revert "Merge pull request #9352 from wwilfinger/walter/influx-inspect-export-import"
This reverts commit 9aeae7ce82, reversing
changes made to 35b44cc2f0.

The contributor was unable to sign the contributor license agreement so
we have to revert this commit.
2018-02-09 09:53:19 -06:00
Walter Wilfinger 93a19040ce Fix imports of multiple dbs in one export file
batchWrite was using the last database and retention policy read from
the input file. Because batchWrite was called only every batchSize lines
or at EOF, databases with fewer than batchWrite points could be imported
into the incorrect database.

This change forces a flush with batchWrite whenever processDML reads a
change in database or retention policy.
2018-02-05 12:18:03 -06:00
Edd Robinson 648040393c Clean up tests package 2018-01-21 09:53:57 -08:00
Adam 28f3912491
Renamed references for "enterprise" backup/restore mode to "portable" (#9346) 2018-01-19 16:53:43 -05:00
Edd Robinson 8039165ab4 Ensure no double r-locking occurs in IndexSet
use. However, because the reference counting was implemented via
mutexes, it was possible to double `RLock` the series file mutex. This
allows a `Lock` to arrive in-between the two `RLock`s, (such as when
deleting the database), causing deadlock.

This commit addresses this by ensuring that from within `IndexSet`
methods, when calling other `IndexSet` methods, that they're all
unexported, and that those unexported methods never take a lock on the
series file.

Keeping series file locking in exported `IndexSet` methods only, allows
one to see any future races more easily.
2018-01-16 14:56:34 +00:00
Edd Robinson 9866a2d6f5 Skip expensive test in race mode 2018-01-15 15:32:37 +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
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 c854c67ead
Merge pull request #9283 from influxdata/er-tag-keys
Fix duplicate Tag Keys
2018-01-05 14:34:52 +00:00
Edd Robinson 7dced43f02 Unskip test 2018-01-05 12:24:27 +00:00
Edd Robinson 760a9e88ec Ensure test data deleted from disk 2018-01-02 12:51:24 +00:00
Ben Johnson 01aa11af95
circle 2017-12-22 11:30:11 -07:00
Ben Johnson f240a930c7
Preserve original mmap in series file. 2017-12-21 20:00:05 -07:00
Ben Johnson bc0d68f405
Skip estimation test for 386. 2017-12-21 16:00:13 -07:00
Ben Johnson 0afb718a11
OOM test issue 2017-12-21 13:36:32 -07:00
Ben Johnson 4d7426ebbd
Fix race bug. 2017-12-21 10:12:21 -07:00
Edd Robinson bde66f19bc Adjust series file size and partitions 2017-12-18 13:17:42 +00:00
Edd Robinson 3bfe525705 Add 32-bit support to series file
This commit ensures that the series file should work appropriately on
32-bit architecturs. It does this by reducing the maximum size of a
series file to 512MB on 32-bit systems, which should be fully
addressable.

It further updates tests so that the series file size can be reduced
further when running many tests in parallel on 32-bit architectures.
2017-12-15 15:47:26 +00:00
Edd Robinson 289d1f8d44 Allow iterators to return if shard is closing 2017-12-15 00:46:43 +00:00
Edd Robinson 59afd8cc90 Return to original DELETE/DROP SERIES semantics
Since possibly v0.9 DELETE SERIES has had the unwanted side effect of
removing series from the index when the last traces of series data are
removed from TSM. This occurred because the inmem index was rebuilt on
startup, and if there was no TSM data for a series then there could be
not series to add to the index.

This commit returns to the original (documented) DROP/DETETE SERIES
behaviour. As such, when issuing DROP SERIES all instances of matching
series will be removed from both the TSM engine and the index. When
issuing DELETE SERIES only TSM data will be removed.

It is up to the operator to remove series from the index.

NB, this commit does not address how to remove series data from the
series file when a shard rolls over.
2017-12-15 00:02:06 +00:00
Edd Robinson 9e3b17fd09 Ensure deleted series are not returned via iterators 2017-12-14 21:29:35 +00:00
Edd Robinson f6835632e7 Merge master into branch 2017-12-08 17:11:07 +00:00
Edd Robinson 3318c94a2f Clean up 🛁: 2017-12-08 11:38:53 +00:00
Ben Johnson 37803d6803
Fixed 'tests' pkg. 2017-12-07 08:33:47 -07:00
Ben Johnson c36817fffc
Fix retain/release hang issues. 2017-12-06 09:09:41 -07:00
Ben Johnson 493c1ed0d1
inmem tests passing. 2017-12-05 10:49:58 -07:00
Ben Johnson f5f85d65f9
Fixing more tests. 2017-12-04 10:29:04 -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
Ben Johnson 01491ca4f4
intermediate 2017-11-27 07:52:18 -07:00
Edd Robinson 6851db3fc9 Add FGA support to SHOW MEASUREMENTS 2017-11-17 11:06:43 +00:00
Edd Robinson 081d0649a6
Merge pull request #9078 from influxdata/er-race-tests
Skip cardinality tests in race mode
2017-11-07 19:52:30 +00:00
Edd Robinson 5a85f0d239 Skip cardinality tests in race mode 2017-11-07 18:55:43 +00:00
Ben Johnson 156f25ac23
Improve SHOW TAG KEYS performance. 2017-11-07 10:59:19 -07:00
Edd Robinson e69217440b Remove noisy log line 2017-11-07 10:50:49 +00:00
Edd Robinson cce310b057 Skip SHOW TAG KEYS tests 2017-11-06 19:15:01 +00:00
Edd Robinson fbcb299b8a Support WHERE time clause in SHOW TAG VALUES
This commit adds time support to SHOW TAG VALUES. Time can be used as
both a lower and upper boundary. However, there are some caveats.

For the `inmem` index, filtering by time will still return all results
because the index data is shared across shards.

For the `tsi1` index, filtering by time will only work down to the shard
lever. Specifically, when querying by time all shards within that time
range will be used to generate the results.
2017-11-06 19:15:01 +00:00
Edd Robinson f97f5bcc82 Add time based meta query tests 2017-11-06 19:15:00 +00:00
Edd Robinson 5f4708e7ca Split out SHOW TAG KEYS/VALUES tests 2017-11-06 19:15:00 +00:00
Edd Robinson 98d584b63f Use index for SHOW X meta queries
When a meta query does not include a time component then it can be
answered exclusively by the index. This should result in a much faster
query execution that if the TSM engine was engaged.

This commit rewrites the following queries such that they make use
of the index where no time component is present:

  - SHOW MEASUREMENTS
  - SHOW SERIES
  - SHOW TAG KEYS
  - SHOW FIELD KEYS
2017-11-06 19:15:00 +00:00
Stuart Carnie f3d45ba301 influxdata/influxdb/influxql -> influxdata/influxql 2017-10-30 14:40:26 -07:00
Stuart Carnie 7435725e05 move RewriteStatement and neldermead to influxdb/query package 2017-10-30 10:24:15 -07:00
Edd Robinson bda6de9817 Add all versions of CARDINALITY commands 2017-10-26 16:22:48 +01:00
Edd Robinson ba9506764c SHOW FIELD KEY EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson c57e192984 SHOW TAG VALUES EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson 47c0840d5b SHOW TAG KEY EXACT CARDINALITY 2017-10-26 16:22:31 +01:00
Edd Robinson f80591bfa1 Implement MEASUREMENT cardinality estimation 2017-10-26 16:22:31 +01:00
Edd Robinson 3079b41f00 Implement series cardinality estimation 2017-10-26 16:22:31 +01:00