Commit Graph

176 Commits (master)

Author SHA1 Message Date
Jeffrey Smith II f74c69c5e4
chore: update to go 1.20 (#24088)
* build: upgrade to go 1.19

* chore: bump go.mod

* chore: `gofmt` changes for doc comments

https://tip.golang.org/doc/comment

* test: update tests for new sort order

* chore: make generate-sources

* chore: make generate-sources

* chore: go 1.20

* chore: handle rand.Seed deprecation

* chore: handle rand.Seed deprecation in tests

---------

Co-authored-by: DStrand1 <dstrandboge@influxdata.com>
2023-02-09 14:14:35 -05:00
Dane Strandboge 82d1123e78
build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
Daniel Moran cc6accf106
chore: delete old-style DBRP mapping (#22339) 2021-08-30 18:27:11 -04:00
Daniel Moran b1b076f600
refactor: delete old backup/restore CLI commands, replace with dependency on new CLI repo (#21703) 2021-06-17 09:18:55 -04:00
Daniel Moran 00afd95cb7
refactor: automated move of errors and id from root to kit (#21101)
Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-03-30 14:10:02 -04:00
Daniel Moran d4a0c34c39
fix(onboarding): deprecate misleading `retentionPeriodHrs` key (#20798) 2021-03-01 09:55:39 -05:00
Daniel Moran 2920b55e19
fix(http): fix passing of bucket ID by write-handler client (#20679) 2021-02-02 17:34:40 -05:00
Daniel Moran afdcb18655
refactor: simplify how we set the top-level influxd logger (#20374) 2020-12-21 11:15:08 -08:00
Daniel Moran 81a671894d
refactor(cmd/influxd): separate CLI parsing from core launcher (#20109) 2020-11-30 09:38:27 -05:00
Stuart Carnie 5d734a3bc1 fix: Update tests.Client to use new HTTP client APIs 2020-11-17 09:17:28 +11:00
Stuart Carnie 91acebeab0 chore: Lots of cleanup and response to PR feedback. 2020-11-17 08:14:17 +11:00
Stuart Carnie 1cd9d0b04a feat: Port pipeline tests package from Cloud
This package provides essentially the same API as the Cloud tests
package, utilising the `TestLauncher` type.

Additional With functional options were added to the `Launcher`
in order to expose type-safe configuration of InfluxQL configuration.
Additional With options may be added in the future as the need arises.
2020-11-17 08:14:17 +11:00
Mark Rushakoff f2898d1992 Wipe out workspace in preparation for v2 merge
"Knock knock."

"Who's there?"

"InfluxDB Veet."

...
2019-01-11 10:38:50 -08:00
Stuart Carnie 6affa7c7f5 chore(flux): Remove Flux gRPC handler and update config.sample.toml 2018-11-05 14:26:37 -07:00
Ben Johnson 8be85c154a
Allow value filtering on SHOW TAG VALUES
This commit allows users to filter on the `value` field in the
`SHOW TAG VALUES` command:

	SHOW TAG VALUES WITH KEY = "mytag" WHERE "value" = 'myvalue'

Previously this command would return all values.
2018-06-28 09:50:03 -06:00
Edd Robinson 3cb9e13d58 Address PR feedback 2018-06-13 17:41:50 +01:00
Edd Robinson 652bb3d3c3 Keep __name__ tag in results 2018-06-13 11:12:56 +01:00
Edd Robinson 1eca0093de Remove __name__ tag once parsed for measurement 2018-06-13 00:20:00 +01:00
Edd Robinson 28b6df7afb Ensure remote read can handle no data in time 2018-06-12 23:10:18 +01:00
Edd Robinson 522e509709 Add further tests 2018-06-12 15:54:18 +01:00
Adam b3cd949c3f
Update backup flags to have long/short versions (#9713)
Updated flags, help text, removed documentation for deprecated legacy options.  Updated documentation to describe the  syntax and options for the newer -portable format. Legacy support remains, but is only referenced in the online documentation.
2018-04-25 10:49:46 -04:00
Adam 72bceca888
Fix stream package to allow for renaming the file before writing it to the stream (#9684)
* Fix stream package to allow for renaming the file before writing it to the stream

* updated test to make sure that the final tsm file has more than one block
2018-04-05 16:24:29 -04:00
Jason Wilder 8730be1e9f Fix flaky test TestServer_ConcurrentPointsWriter_Subscriber
The LocalServer could be closed before the goroutine writing points
exited causing nil pointer panic.

Fixes #9583
2018-03-22 14:33:55 -06:00
Jonathan A. Sternberg f8d60a881d Refactor the math engine to compile the query and use eval
This change makes it so that we simplify the math engine so it doesn't
use a complicated set of nested iterators. That way, we have to change
math in one fewer place.

It also greatly simplifies the query engine as now we can create the
necessary iterators, join them by time, name, and tags, and then use the
cursor interface to read them and use eval to compute the result. It
makes it so the auxiliary iterators and all of their complexity can be
removed.

This also makes use of the new eval functionality that was recently
added to the influxql package.

No math functions have been added, but the scaffolding has been included
so things like trigonometry functions are just a single commit away.

This also introduces a small breaking change. Because of the call
optimization, it is now possible to use the same selector multiple times
as a selector. So if you do this:

    SELECT max(value) * 2, max(value) / 2 FROM cpu

This will now return the timestamp of the max value rather than zero
since this query is considered to have only a single selector rather
than multiple separate selectors. If any aspect of the selector is
different, such as different selector functions or different arguments,
it will consider the selectors to be aggregates like the old behavior.
2018-03-19 15:01:15 -05:00
Adam b213b31cd4
Bugfix for shard collisions resulting from attempted _internal import (#9569) 2018-03-14 11:51:57 -04:00
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