Commit Graph

14352 Commits (fb99e615981409f441f33899beb992376858057c)

Author SHA1 Message Date
Stuart Carnie 39a3d2335e chore(flux): Update to Flux 0.7.1
Resolve breaking API changes
2018-11-30 10:38:56 -07:00
Jeff Wendling 9f0cd683b9
Merge pull request #10516 from influxdata/jmw-conflict-concurrency
tsdb: conflict based concurrency resolution
2018-11-29 14:14:24 -07:00
Ben Johnson cd1e1ca755
Merge pull request #10525 from influxdata/bj-warn-series-file
Skip and warn series files in retention policy directory.
2018-11-28 11:42:29 -07:00
Jeff Wendling cca97bf9b9
Merge pull request #10517 from influxdata/jmw-always-cleanup-fields-index
tsdb: clean up fields index for every kind of delete
2018-11-28 11:33:34 -07:00
Ben Johnson 298eddb82c
Skip and warn series files in retention policy directory. 2018-11-28 11:20:18 -07:00
Jeff Wendling 72283cd9c5
Merge pull request #10509 from influxdata/jmw-tsdb-disallow-mixed-index
tsdb: don't allow deletes to a database in mixed index mode
2018-11-28 10:53:42 -07:00
Jeff Wendling 259f3fe6e5 tsdb: consider measurement drops per shard on inmem 2018-11-27 16:59:17 -07:00
Jeff Wendling 0a2f6191a6 tsdb: clean up fields index for every kind of delete
Before this, if you deleted everything with `delete where true`
for example, then you would be left with all of your measurements
in the fields index. That would cause ghost fields to reappear
if someone reinserted to the measurement.

This fixes that by making it so the deepest most delete code
checks if the measurement was removed from the index, and if so
cleaning it up out of the fields index.

Additionally, it fixes bugs in that cleanup code where if you had
a measurement like "m1" and "m10", when iterating over the cache
or file store, "m1" would match "m10" due to it only checking the
prefix. This also has it check the character right after the
measurement to be either a comma because tags started, or the first
character of the field separator.
2018-11-27 16:12:06 -07:00
Christopher M. Wolff 4eeb5ad191
Merge pull request #10523 from influxdata/cmw-controller-log
Remove "Verbose" option from controller.Config
2018-11-26 15:37:51 -07:00
Christopher Wolff 32e28c70ab Remove "Verbose" option from controller.Config (loggler log level will be used instead) 2018-11-26 14:10:59 -08:00
Jonas Hahnfeld 217772752d Fix compaction logic on infrequent cache snapshots
This change fixes #10511 that manifests when a shard is considered cold
faster than its cache is snapshotted. This can happen if WAL is enabled
because previously the code only considered the last modification of
compacted tsm1 files. Instead Engine.LastModified() also takes the WAL
into account if necessary.
2018-11-26 22:05:37 +01:00
Jeff Wendling 4cad51a604 tsdb: conflict based concurrency resolution
There are some problematic races that occur when deletes happen
against writes to the same points at the same time. This change
introduces guards and an epoch based system to coordinate these
modifications.

A guard matches a point based on the time, measurement name, and
some conditions loaded from an influxql expression. The intent
is to be as precise as possible without allowing any false
neagatives: if a point would be deleted, the guard must match it.
We are allowed to match more points than necessary, at the cost
of slowing down writes.

The epoch based system keeps track of outstanding writes and
deletes and their associated guards. When a delete operation
is going to start, it waits until all current writes are
done, and installs its guard, blocking all future writes that
contain points that may conflict with the delete. This allows
writes to disjoint points to proceed uncontended, and the
implementation is optimized for assuming there are few
outstanding deletes. For example, in the case that there are no
deletes, a write just has to take a mutex, bump a counter, and
compare a value against zero. The epoch trackers are per shard,
so that different shards never have to contend with one another.
2018-11-21 19:19:53 -07:00
Jeff Wendling 030adf4bd5 tsdb: don't allow deletes to a database in mixed index mode
TSI1 and inmem indexes have different properties during deletes.
Specifically, inmem shares a global index across all shards, where
every tsi1 index is contained to a specific shard. When deleting
a series, it may cause the last reference to the series across all
shards to be dropped, necessitating a removal from the series file.
Since the inmem index shares the index across all shards, removing
the series when it's removed from the series file is sufficient.

However, in the case of a mixed index database, if the last shard
is a TSI1 shard, the other inmem indexes are not available when we
discover that it was the last reference to the series. This ends
up leaving the series in the inmem index without a series id in
the series file, causing all sorts of misbehavior.

Rather than continue curling ourselves into a ball to try to fix
this unsupported mode, give a helpful error message to the user
that they must run their database in a non-mixed index mode to
allow deletes.
2018-11-21 18:18:38 -07:00
Stuart Carnie 7c37b6e30c chore: Update to platform@master 2018-11-21 15:51:52 -07:00
Stuart Carnie a52f96e03d feat(storage): Export GetReadSource API for Enterprise reuse 2018-11-21 15:51:52 -07:00
Stuart Carnie a797529f6f feat(flux): Resolve db / rp during from spec creation
This change determines invalid db/rp values sooner and simplifies
implementation in Enterprise
2018-11-21 15:51:52 -07:00
Stuart Carnie 369bc8cf29 feat(flux): Optional query parameter to limit Flux query to single node 2018-11-21 15:51:52 -07:00
Stuart Carnie dde5e16091 chore: Use influxdata/platform@sgc-reader for distributed query support
* Update mock to implement `func Err() error`
2018-11-21 15:51:52 -07:00
Jeff Wendling c4a3ecf021 fix verify seriesfile in presence of tombstones
tombstone entries don't contain a key, and parsing the empty
key panics.
2018-11-21 11:07:38 -07:00
Hans Petter Bieker 4670b8d65e Removed file that should not have been added. 2018-11-20 16:39:27 +01:00
Hans Petter Bieker 8f397e0e4a Fixed changelog. 2018-11-20 16:31:17 +01:00
Hans Petter Bieker f1bf1aa289 Fixed changelog. 2018-11-20 16:29:51 +01:00
Hans Petter Bieker fd21a0b326 Added changelog. 2018-11-20 16:28:26 +01:00
Hans Petter Bieker 1d5463e0a0 Do not rebuild series index on delete for series not overlapping in time. 2018-11-20 16:24:13 +01:00
Hans Petter Bieker 7708e12bd7 Added changelog. 2018-11-20 10:39:53 +01:00
Hans Petter Bieker 926f78d832 Do not rebuild series index on delete when the series still exists in the cache. 2018-11-20 10:34:59 +01:00
Hercules Mango Churchill f2cf118473 Update changelog 2018-11-19 19:05:18 +00:00
Jonathan A. Sternberg ba1ee48f07
Merge pull request #10494 from influxdata/js-toml-apply-env-overrides-slices
Fix ApplyEnvOverrides when a type that implements Unmarshaler is in a slice
2018-11-19 13:05:00 -06:00
Jonathan A. Sternberg e640104c9c
Fix ApplyEnvOverrides when a type that implements Unmarshaler is in a slice
Most parts of `ApplyEnvOverrides` will check if the value is empty
before attempting to apply the environment override. One exception is
that when a type implements Unmarshaler and it is within a slice, it
does not check that an empty value was passed.

This change fixes it so that we will not call `UnmarshalText` when the
environment variable is set to empty.
2018-11-18 10:49:04 -06:00
Stuart Carnie c3d7f3de2b fix: Allow compactor to make progress if v.MaxTime() != entry.MaxTime 2018-11-14 09:13:13 -07:00
Stuart Carnie a4305ddb17 fix(simple8b): Fix incorrect encoding for a run of 119 or 239 1s
If 120th or 240th value is not a 1, k still passes the check in the
switch, causing the last value to be lost. If this value occurs at
the boundary of a block, the max time will be incorrect, resulting in
compaction failing to make forward progress.
2018-11-14 09:13:13 -07:00
Stuart Carnie 5d083887a5 chore: Compactor test which replicates issue #10465
Due to an encoding bug with simple8b, it is possible that the
MaxTime for a TSM index entry does not match the last encoded timestamp.
2018-11-14 09:13:13 -07:00
ShiKaiWi 9200d6a67d refactor writeToShard of PointsWriter 2018-11-14 21:27:38 +08:00
Stuart Carnie b075de6c96 fix(storage): Fix go:generate line to refer to correct proto file
Closes #10473
2018-11-12 14:12:09 -08:00
Stuart Carnie 7e0be6fbaf fix(flux): Fix empty results when using _value in filter expression
Closes #10471
2018-11-12 11:00:45 -08:00
Jonathan A. Sternberg 2e7d8d753f
Merge pull request #10458 from influxdata/js-flux-0.7.0
Update flux dep constraint to 0.7.0
2018-11-06 14:16:56 -06:00
Jonathan A. Sternberg 0eb2333506
Update flux dep constraint to 0.7.0 2018-11-06 13:05:08 -06:00
Stuart Carnie 3599bdb382 chore(deps): Update flux and platform dependencies 2018-11-05 17:50:15 -07:00
Stuart Carnie 6affa7c7f5 chore(flux): Remove Flux gRPC handler and update config.sample.toml 2018-11-05 14:26:37 -07:00
Stuart Carnie 317fd4982f chore(flux): Document flux-enabled config option 2018-11-05 14:26:37 -07:00
Jonathan A. Sternberg 6f9cb822f2
Merge pull request #10455 from influxdata/js-changelog-update
Update changelog
2018-11-05 12:47:55 -06:00
Jonathan A. Sternberg a16096cbc4
Merge pull request #9943 from michaelyou/hotfix-typo
Some typo and Wrong position of comment
2018-11-05 12:36:05 -06:00
Jonathan A. Sternberg ebafd3714a
Update changelog 2018-11-05 12:28:50 -06:00
Jonathan A. Sternberg f436046b31
Merge pull request #9509 from influxdata/js-http-logging-levels
Add an access log filter for the access log
2018-11-05 12:08:09 -06:00
Jonathan A. Sternberg b3472a54ee
Add an access log filter for the access log
The access log filter allows the access log to be filtered by a status
code pattern. The pattern is a list of strings of the form `NXX`. At
least one number must be specified and up to 2 Xs can be used. That
means the filter can be an exact status code or it can be a range of
them. For example, `500` would only match the 500 http status code while
`5XX` would match any status code beginning with the number 5
(categorized as server errors). The pattern `50X` would also be
accepted. Both uppercase and lowercase Xs are allowed.

Multiple filters can be specified and the log line will be printed if
one of them matches. If there are no filters specified, all status codes
are printed.
2018-11-05 11:46:26 -06:00
Jonathan A. Sternberg b3d42983b6
Merge pull request #10437 from seebs/seebs/errors
Don't use fmt.Errorf on random strings
2018-11-05 11:39:54 -06:00
Stuart Carnie 82c4be9657 chore(deps): Update Flux and Platform dependencies
Includes fix for distinct push down
2018-11-05 09:17:34 -07:00
tmgordeeva 9c0e1cf188
Merge pull request #10391 from influxdata/tg-measurements
Reduce allocations for high measurement writes
2018-11-05 00:48:41 -08:00
Tanya Gordeeva 8b8421049e tsdb: benchmark for many fields 2018-11-02 18:49:28 -07:00
Tanya Gordeeva 7c9ff60413 tsdb/shard: reduce measurement field copying
Removes cloning measurement fields on writes, instead atomically swaps out
measurement field sets when fields are added (with new overhead of copying
existing fields whenever a new one is added).
2018-11-02 18:49:17 -07:00