Commit Graph

435 Commits (090f681737896feb99870ee534c9ccc4203b9a6d)

Author SHA1 Message Date
Dane Strandboge 8bd4fc502d
fix: lost TSI reference / close TagValueSeriesIDIterator in error case (#23461) 2022-06-16 13:35:45 -05:00
davidby-influx a9df3f8a7c
fix: fully clean up partially opened TSI (#23430) (#23454)
When one partition in a TSI fails to open, all previously opened
partitions should be cleaned up, and remaining partitions
should not be opened

closes https://github.com/influxdata/influxdb/issues/23427

(cherry picked from commit d3db48e93d)

closes https://github.com/influxdata/influxdb/issues/23432
2022-06-14 11:49:16 -07:00
Dane Strandboge 82d1123e78
build: upgrade to Go 1.18.1 (#23252) 2022-04-13 15:24:27 -05:00
Sam Arnold 799d349813
fix(tsi): sync index file before close (#22927)
(cherry picked from commit 5fd1b29d74)

Co-authored-by: lifeibo <lifeibo382005@gmail.com>
2021-11-24 15:52:45 -05:00
CasMc 2bace7767d
fix: unhandled errors returned by Sketch.Merge (#22858) 2021-11-10 09:26:24 -05:00
Sam Arnold 2ecbb68fc3
test: fix DiskSizeBytes flakiness (#22639) 2021-10-08 09:46:58 -04:00
Sam Arnold 7dfd7de81f
feat: set X-Influxdb-Version and X-Influxdb-Build headers (#22535)
Closes #20224
Also a forward port of #22038 since I saw the same test failing on 2.x
2021-09-22 07:30:45 -04: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 12fff64760
fix: make TSI index compact old and too-large log files (#22334)
*  TSI index should compact old or too-large log files
* Old tsl files should be compacted without new writes
* Add extra logging when disk size test fails


Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-08-30 18:27:48 -04:00
Jonathan A. Sternberg f94783e016
build(flux): update flux to master and change renamed structs (#22281) 2021-08-26 10:07:02 -05:00
Daniel Moran 5aa91f0524
refactor: delete unused FileSet methods, clean up some errors (#22309) 2021-08-26 10:48:59 -04:00
Sam Arnold 962b9d7d02
fix: simplify file set, remove series file member (#21831) 2021-07-12 10:43:20 -04:00
Dane Strandboge ba31a0e260
feat: port `influx inspect dumptsi` subcommand (#21784) 2021-07-06 11:40:21 -05:00
Yun Zhao 4f535d281a
fix(tsi1): optimize the comparison of SeriesIDSet. (#21013) 2021-03-23 13:27:38 -04:00
Tristan Su 9c63033e8d
chore: clean up unused fields in FileSet (#20770)
Co-authored-by: Tristan Su <suqing.sq@alibaba-inc.com>
2021-03-05 09:55:03 -05:00
Daniel Moran 727a7b58c1
test: replace influxlogger with zaptest logger (#20589) 2021-02-11 10:12:39 -05:00
Sam Arnold 781fa0e846 chore: add goimports 2021-01-29 14:06:52 -05:00
Daniel Moran 9aefa6f868
fix(tsdb): never use an inmem index (#20313)
And fix the logging setup for the TSDB storage engine
2020-12-23 07:46:57 -08:00
Ben Johnson 65f42deec4
Merge pull request #20008 from influxdata/flakey-test-field-conflict-concurrent
fix: Add locking during tsi iterator creation.
2020-11-12 13:42:38 -07:00
Ben Johnson edb5e56881 fix: Add locking during tsi iterator creation.
This commit fixes a locking issue that caused the `TestShard_WritePoints_FieldConflictConcurrent`
test to fail.
2020-11-12 06:57:29 -07:00
Daniel Moran 15b9531273
fix: correct various typos (#19987)
Co-authored-by: kumakichi <xyesan@gmail.com>
2020-11-11 13:54:21 -05:00
Mark Rushakoff 1f1f520c58 chore: remove unreferenced tsdb/index/internal package 2020-10-28 12:38:01 -04:00
sans 7dcaf5c639
fix: typos (#19734) 2020-10-13 09:50:32 -07:00
Stuart Carnie 8753a7fd08 chore: Fix invalid string casts from integers
Newer Go versions generate a compile time error
2020-09-16 11:55:20 -07:00
Ayan George ca2055c16c
refactor: Replace ctx.Done() with ctx.Err() (#19546)
* refactor: Replace ctx.Done() with ctx.Err()

Prior to this commit we checked for context cancellation with a select
block and context.Context.Done() without multiplexing over any other
channel like:

  select {
    case <-ctx.Done():
      // handle cancellation
    default:
      // fallthrough
  }

This commit replaces those type of blocks with a simple check of
ctx.Err().  This has the following benefits:

* Calling ctx.Err() is much faster than entering a select block.

* ctx.Done() allocates a channel when called for the first time.

* Testing the result of ctx.Err() is a reliable way of determininging if
  a context.Context value has been canceled.

* fix: Fix data race in execDeleteTagValueEntry()
2020-09-16 12:20:09 -04:00
Brett Buddin b917d8d9b0
chore(influxdb): Placate the linter. 2020-08-27 15:46:32 -04:00
Stuart Carnie dee8977d2c
chore: move v2/v1/tsdb → v2/tsdb 2020-08-26 10:46:47 -07: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
Edd Robinson 3a055a6107 Fix cardinality estimation error
This commit fixes an error in the TSI index with estimating the
cardinality of series recently added and then removed.
2019-01-10 17:46:30 +00: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
Edd Robinson cade59e253 Fix panic in IndexSet
This commit fixes a panic where a concurrent removal of a shard and meta
query could cause a `nil` index to be added to the IndexSet`.
2018-10-26 18:23:54 +01:00
Ben Johnson bdcbad3fc9
Fix append of possible nil iterator.
This commit updates an iterator list to ignore `nil` iterators.
Adding a `nil` caused the `SeriesIterators.Close()` to panic.
2018-10-02 13:19:21 -06:00
Ben Johnson 0d777ad423
Fix tsi1 sketch locking. 2018-09-26 17:01:47 -06:00
Edd Robinson 812ac6da25 PR feedback 2018-09-18 15:58:38 -07:00
Edd Robinson a15bdeef92 Fix megacheck 2018-09-18 15:58:38 -07:00
Edd Robinson 76237d80f2 Address PR feedback 2018-09-18 15:58:38 -07:00
Ben Johnson e651153f1c Add TagValueSeriesIDCache.Delete(). 2018-09-18 15:58:38 -07:00
Ben Johnson fcbc03240a Inline mutex into TagValueSeriesIDCache. 2018-09-18 15:58:38 -07:00
Edd Robinson bdc293abdd Tidy up 2018-09-18 15:58:38 -07:00
Edd Robinson d8af622333 Add benchmark for TagSets across indexes 2018-09-18 15:58:38 -07:00
Edd Robinson 5c88a1dd0e Fix locking on cache 2018-09-18 15:58:38 -07:00
Edd Robinson 6d12f5d323 Debug 2018-09-18 15:58:38 -07:00
Edd Robinson 8af7c133db Refactor cache 2018-09-18 15:58:38 -07:00
Edd Robinson 1ae716b64e Use copy-on-write when cloning bitmaps
This commit sets the copy-on-write feature of the SeriesIDSets, such
that we can make immutable clones of underlying bitmaps efficiently. If
the original bitmap is modified then a copy will be made, which won't
affect the clone.
2018-09-18 15:58:38 -07:00
Edd Robinson baf35f2138 Add benchmarks for cache and option to disable 2018-09-18 15:58:38 -07:00
Edd Robinson 3f6ef0ba22 Update cached bitset results with new series ids
This commit ensures that cached bitset results at the Index level are
updated whenever new series ids are created that would belong in those
bitsets.

For example, if we have a cached bitset for the tuple {mem, region,
west}, and we add the series mem,host=prod,region=west then we would
update the cached bitset for {mem, region, west} with the series id of
the newly written series.
2018-09-18 15:58:38 -07:00
Edd Robinson 065d47e4f2 Return created series ids from LogFile insertion 2018-09-18 15:58:38 -07:00
Edd Robinson 52b5640a4a Add test for TagValueSeriesIDIterator 2018-09-18 15:58:38 -07:00
Edd Robinson 9fb301cf10 Add CreateSeriesListIfNotExists benchmark 2018-09-18 15:58:38 -07:00