Commit Graph

565 Commits (903d30d65894cd282eae91c4026e39fe57a7b538)

Author SHA1 Message Date
Daniel Moran 37088e8f53
feat(influxql): Add hyper log log operators (#22322)
In addition to helping with normal queries, this can improve the 'SHOW CARDINALITY'
meta-queries.


Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-08-30 15:46:46 -04:00
Daniel Moran 4dd2d7cc7f
fix: hard limit on field size while parsing line protocol (#22311)
Per https://docs.influxdata.com/influxdb/v2.0/reference/syntax/line-protocol/#string
we only support 64KB, but 1MB is a more realistic practical limit. Before this commit there was
no enforcement of field value size.


Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-08-27 10:01:17 -04:00
Daniel Moran df448c654b
feat(tsi): optimize series iteration (#22316)
When using queries like 'select count(_seriesKey) from bigmeasurement`, we
should iterate over the tsi structures to serve the query instead of loading
all the series into memory up front.


Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-08-27 09:59:23 -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
davidby-influx 9923d2e8d5
fix: avoid compaction queue stats flutter (#22235)
When the compaction planner runs, if it cannot acquire
a lock on the files it plans to compact, it returns a
nil list of compaction groups. This, in turn, sets the
engine statistics for compactions queues to zero,
which is incorrect. Instead, use the length of pending
files which would have been returned.

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

(cherry picked from commit 7d3efe1e9e)

closes https://github.com/influxdata/influxdb/issues/22141
2021-08-17 14:03:54 -07:00
davidby-influx 16b737dea4
fix: copy names from mmapped memory before closing iterator (#22040) (#22059)
This fix ensures that memory-mapped files are not released
before pointers into them are copied into heap memory.
MeasurementNamesByExpr() and MeasurementNamesByPredicate() can
cause panics by copying memory from mmapped files that have been
released. The functions they call use iterators to files which
are closed (releasing the mmapped files) before the memory is
safely copied to the heap.

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

(cherry picked from commit a989f8f8b6)

closes https://github.com/influxdata/influxdb/issues/22002
2021-08-04 15:58:20 -07:00
davidby-influx a78729b2ff
chore: add logging to compaction (#21707) (#21900)
Compaction logging will generate intermediate information on
volume of data written and output files created, as well as
improve some of the anti-entropy messages related to compaction.

Closes https://github.com/influxdata/influxdb/issues/21704

(cherry picked from commit 73bdb2860e)

Closes https://github.com/influxdata/influxdb/issues/21706
2021-07-21 09:43:21 -07:00
davidby-influx dd34f5fd9d
chore: add more logging
tsdb.Engine.IsIdle and tsdb.Engine.Digest now return a reason string for why the engine & shard are not idle.
Callers can then use this string for logging, if desired. The returned reason does not allocate memory, so the
caller may want to add the shard ID and path for more information in the log. This is intended to be used in
calls from the anti-entropy service in Enterprise.

(cherry picked from commit bf45841359)

fixes https://github.com/influxdata/influxdb/issues/21448

(cherry picked from commit c8da9bafbf)

closes https://github.com/influxdata/influxdb/issues/21894
2021-07-20 11:57:52 -07: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
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
davidby-influx f8ef784cff
fix: don't access a field in a nil struct (#21693) (#21696)
(cherry picked from commit aca69e530f)
2021-06-15 11:51:51 -07:00
davidby-influx 5251c85412
fix: Do not close connection twice in DigestWithOptions (#21659) (#21662)
tsm1.DigestWithOptions closes its network connection
twice. This may cause broken pipe errors on concurrent
invocations of the same procedure, by closing a reused
i/o descriptor. This fix also captures errors from TSM
file closures, which were previously ignored.

Closes https://github.com/influxdata/influxdb/issues/21656

(cherry picked from commit bce6553459)

Closes https://github.com/influxdata/influxdb/issues/21660
2021-06-10 13:32:36 -07:00
Daniel Moran 9b02820a0f
build: upgrade to go1.16 (#21642)
* build: bump to go 1.16
* build: go mod tidy & update godeps CI step
2021-06-09 12:59:05 -04:00
Daniel Moran d747e7ec4e
feat: add config parameters to toggle WAL concurrency and timeouts (#21621)
* feat: add context parameter to Take() method on fixed limiter
* refactor: plumb context through to uses of Take()
* test: update tests to pass context as needed
* feat: add config toggles for setting WAL write concurrency & timeout
2021-06-09 11:03:53 -04:00
davidby-influx d10a727157
fix: avoid rewriting fields.idx unnecessarily (#21592) (#21610)
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be286be)

Closes https://github.com/influxdata/influxdb/issues/21598
2021-06-04 13:17:53 -07:00
Yun Zhao 2116332950
fix(tsm1): fix calculation of tsmFullCompactionQueue statistic (#20897)
Co-authored-by: zhaoyun.248 <zhaoyun.248@bytedance.com>
2021-06-04 10:26:37 -04:00
Yun Zhao ce536037dc
fix(tsm1): limit concurrent WAL encodings to reduce memory pressure under heavy write load (#20814)
Co-authored-by: zhaoyun.248 <zhaoyun.248@bytedance.com>
2021-06-03 16:11:36 -04:00
Daniel Moran 00420fb54c
fix(influxql): make meta queries respect query timeout (#21545)
Co-authored-by: davidby-influx <dbyrne@influxdata.com>
2021-05-24 21:10:53 -04:00
Daniel Moran fc3beb7d0a
fix: last-modified of empty shard directory shouldn't be Unix epoch. (#21481)
Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
2021-05-17 13:36:36 -04:00
LLThomas 531c984d37
chore: fix typo (#21284) 2021-05-01 08:55:47 -04:00
Jonathan A. Sternberg 7766672797
fix(storage): cursor requests are [start, stop] instead of [start, stop) (#21318)
The cursors were previously [start, stop) to be consistent with how flux
requests data, but the underlying storage file store was [start, stop]
because that's how influxql read data. This reverts back the cursor
behavior so that it is now [start, stop] everywhere and the conversion
from [start, stop) to [start, stop] is performed when doing the cursor
request to get the next cursor.

Co-authored-by: Sam Arnold <sarnold@influxdata.com>
2021-04-30 12:15:06 -04:00
Daniel Moran 7b1763e791
fix(tsdb): minimize lock contention when adding new fields or measurements (#21228)
fields.idx frequent writes cause lock contention and fields.idx is recreated
when a field or measurement is added in a WritePointsWithContext()
This eliminates locking during the actual file rewrite, and limits it to
the times when the MeasurementFieldSet is actually being read or written
in memory and when the new file is being renamed.

Test verification of correct behavior by checking the fields.idx
file matches the in-memory copy after heavily parallel measurement addition.


Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
2021-04-15 14:08:28 -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 b1283bc998
build: fix 'go generate' and regenerate the universe (#21089) 2021-03-30 10:32:14 -04:00
Yun Zhao 4f535d281a
fix(tsi1): optimize the comparison of SeriesIDSet. (#21013) 2021-03-23 13:27:38 -04:00
Daniel Moran 7169df3b51
refactor(tsm1): delete unused Write method on cache (#20890) 2021-03-09 09:09:20 -05: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
Yun Zhao 265c1f311e
fix(tsm1): fix wal's totalOldDiskSize statistics (#20811) 2021-03-03 15:20:24 -05:00
Daniel Moran 5fc9240dc5
refactor: delete unused v1 monitoring service (#20818) 2021-03-02 12:39:38 -05:00
Sam Arnold 1068d1de6f
refactor: Remove unused function add and unused variable keysHint (#20803) 2021-02-25 08:31:00 -05:00
Daniel Moran 3abd65a1a1
fix(tsm1): fix data race and validation in cache ring (#20797)
Co-authored-by: Yun Zhao <zhaoyun2316@gmail.com>
2021-02-24 16:28:30 -05:00
Daniel Moran f7516e31fe
fix(tsm1): mark tombstone stats as loaded to enable caching (#20782) 2021-02-19 11:11:51 -05:00
Daniel Moran efd766d60f
fix(tsm1): fix data race when accessing tombstone stats (#20773) 2021-02-18 20:23:57 -05:00
Daniel Moran 727a7b58c1
test: replace influxlogger with zaptest logger (#20589) 2021-02-11 10:12:39 -05:00
Tristan Su 1a00f2f123
fix(tsm): should not check write-ahead-log size against default size (#20585)
it should check against the local saved SegmentSize instead of the
default const DefaultSegmentSize.
2021-02-10 10:32:53 -05:00
Tristan Su c9965e56ca
fix(tsi): close series id iterator after merging (#19936)
This use-after-free bug may lead to segfault. The iterators that have
reference to the underlying index files were closed too early while
the bitmaps were still used afterwards. If a compaction occurs
concurrently and removes the index files, it would result in accessing
unmap'd memory address.
2021-02-10 10:13:07 -05:00
Sam Arnold 781fa0e846 chore: add goimports 2021-01-29 14:06:52 -05:00
Daniel Moran 743aef4a98
fix(tsdb): allow backups during snapshotting, and don't leak tmp files (#20527)
Co-authored-by: davidby-influx <dbyrne@influxdata.com>
2021-01-18 19:02:26 -08:00
Daniel Moran 7f3f562b67
test: bump timeouts and retry counts to try fixing flaky test failures. (#20412) 2020-12-23 11:12:11 -08: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 7dafc2cf34 feat(tsdb): Implement delete with predicate. 2020-12-02 14:55:02 -07:00
Stuart Carnie 35227ca887 chore: Add unit test to replicate issue #20035 2020-11-17 12:06:33 -05: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
Ben Johnson 419b0cf76b feat: Implement full restore 2020-11-05 10:05:01 -07:00
Ben Johnson 5f1968b331 fix: Skip deleted shard groups during backup 2020-11-05 10:05:01 -07:00
Ben Johnson ea1a3dbe60 fix: Return ENotFound for BackupShard() 2020-11-05 10:05:01 -07:00
Ben Johnson 23679c2375 feat: Implement backup/restore CLI subcommands. 2020-11-05 10:05:01 -07:00
jl fbe85ef548 feat: enable window pushdowns 2020-10-30 18:09:38 -07: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
Roger Peppe 0913737c5f
Merge pull request #19653 from influxdata/rogpeppe-007-remove-batcher
fix: tsdb: remove PointBatcher
2020-09-29 20:40:48 +01:00
Jonathan A. Sternberg bde1209349
fix(tsdb): exclude the stop time from the array cursor (#19622)
This is a backport of #14262 to the 1.x storage engine. The 1.x storage
engine is now the primary engine for open source so when we switched we
regressed to the old behavior.

This also fixes `go generate` for the tsm1 package by running `tmpl`
with `go run` instead of assuming the correct one is installed in the
path.
2020-09-28 12:04:30 -05:00
Roger Peppe 8e3419238e chore: tsdb: remove PointBatcher
It's unused. It can always be resurrected from the history if needed.
2020-09-28 17:39:05 +01:00
Jonathan A. Sternberg 025319c387
fix(services/storage): multi measurement queries return all applicable series (#19566)
This fixes multi measurement queries that go through the storage service
to correctly pick up all series that apply with the filter. Previously,
negative queries such as `!=`, `!~`, and predicates attempting to match
empty tags did not work correctly with the storage service when multiple
measurements or `OR` conditions were included.

This was because these predicates would be categorized as "multiple
measurements" and then it would attempt to use the field keys iterator
to find the fields for each measurement. The meta queries for these did
not correctly account for negative equality operators or empty tags when
finding appropriate measurements and those could not be changed because
it would cause a breaking change to influxql too.

This modifies the storage service to use new methods that correctly
account for the above situations rather than the field keys iterator.

Some queries that appeared to be single measurement queries also get
considered as multiple measurement queries. Any query with an `OR`
condition will be considered a multiple measurement query.

This bug did not apply to single measurement queries where one
measurement was selected and all of the logical operators were `AND`
values. This is because it used a different code path that correctly
handled these situations.
2020-09-17 14:28:24 -05: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
Stuart Carnie 04cff2a8d2 fix: Unit test 2020-09-04 15:56:57 -07:00
Stuart Carnie a24edb2b1c
chore: Skip tests on circleci
This is derived from 2fd8264 and 4f850b5, which skips tests on appveyor
2020-08-31 12:14:27 -07:00
Stuart Carnie f2205b37aa
chore: Skip TSI cardinality tests on circleci
This is derived from 793635d, which skips tests on appveyor
2020-08-31 12:11:04 -07:00
Stuart Carnie b1b6c1047a
chore: remove t.Parallel() in an attempt to make CircleCI happy 2020-08-31 10:45:23 -07: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
Edd Robinson 2b175291be
refactor: WIP removing tsbd 2020-08-03 09:18:34 -07:00
Stuart Carnie e3060c291c
refactor: tsdb store builds an runs 2020-08-03 09:18:32 -07:00
Stuart Carnie 92efddbfbe
chore(tsdb): Initial commit of tsdb package
* pulls in 1.x tsdb, compiles and passes test
2020-08-03 09:17:23 -07:00
Ben Johnson 14a82ee65d fix(tsdb): Fix mincore wait() out of bounds calls 2020-07-27 11:48:39 -06:00
Ben Johnson 3cc2638bbf feat(tsi1): Add optional mincore limiter to TSI 2020-07-22 10:17:42 -06:00
Gavin Cabbage 3c6b728702
chore: use go generate to download large tsdb testdata (#18993)
* chore: use go generate to download large tsdb testdata

* chore(gitignore): TSM/TSI verbiage
2020-07-22 11:29:22 -04:00
Ben Johnson c476da2153
Merge pull request #18982 from influxdata/mincore-limiter
feat(mincore): Add page fault limiter
2020-07-17 12:22:54 -06:00
Ben Johnson c28eb70856 feat(mincore): Add page fault limiter
This commit adds `mincore.Limiter` which throttles page faults caused
by mmap() data. It works by periodically calling `mincore()` to determine
which pages are not resident in memory and using `rate.Limiter` to
throttle accessing using a token bucket algorithm.
2020-07-17 09:37:31 -06:00
Gavin Cabbage ef3ee96eea
chore: download tsi1 testdata with go generate (#18972)
* chore: remove tsi1 testdata and add go generate file to download

* chore: fix testdata url and rename gen file

* fix: add testdata generate command to Makefile

* chore: add testdata dir to gitignore

* refactor(tsdb): improve error message when missing testdata

* refactor(tsdb): tagged testdata and avoid stacktrace when missing
2020-07-17 11:31:29 -04:00
ricky dcf995922c test: set bigger max size of cache in TestConcurrentReadAfterWrite 2020-07-16 10:05:30 +08:00
ricky 9e82797a38 fix: missing data when reading after writing 2020-07-15 14:49:42 +08:00
Phil Bracikowski 25461dddcd
chore(testing): add missing defer to clean up test temp files (#18948) 2020-07-14 13:52:28 -07:00
Stuart Carnie 99bbbd3e4e
fix(storage): Reduce the check frequency
Checking a channel too regularly could cause
context switching to other goroutines. In tight loops,
it is prudent to check, but to do so less frequently so
as to avoid thrashing.
2020-07-09 18:44:00 -07:00
Brett Buddin 51406f4f62
feat(tsdb): SHOW TAG KEYS (no time) query using only TSI data. (#18905)
* feat(tsdb): SHOW TAG KEYS (no time) query using only TSI data.

* fix(tsdb): Allow for earlier return when scanning during show tag keys.

* fix(tsdb): Speed things up by using the key merger to reduce allocs.

* chore(tsm1): Fix golint.

* fix(tsdb): Remove sorting, because these keys should already be sorted.

* fix(tsdb): Remove dead code to placate the linter.
2020-07-09 18:01:42 -04:00
Ben Johnson be98fe3a81
Merge pull request #18901 from influxdata/tsm1-file-stat-created-at
feat(tsdb): Add CreatedAt field for tsm1.FileStat
2020-07-09 14:13:00 -06:00
jlapacik 49bdad8681 fix: descending array cursor should include end time
Fixes https://github.com/influxdata/influxdb/issues/18897.
2020-07-09 12:22:25 -07:00
jlapacik e6e55038e8 test: descending array cursor should include end time 2020-07-09 12:22:25 -07:00
Stuart Carnie d2dd19b70e
feat(storage): InfluxQL schema APIs without time range
These changes introduce optimized schema APIs for InfluxQL that
utilize the time series index (TSI) exclusively for significant
performance gains.
2020-07-09 10:09:19 -07:00
Ben Johnson 3fe7c63a0a feat(tsdb): Add CreatedAt field for tsm1.FileStat
This commit adds a "created at" field to `tsm1.FileStat` which
uses the `ModTime()` of the TSM file but excludes any updates
for tombstone files.
2020-07-09 10:38:59 -06:00
Gavin Cabbage 34ebc852c0
fix(tsm1): delimit tsmKeyPrefix with appended comma (#18785)
* fix(tsm1): delimit tsmKeyPrefix with appended comma

Fixes #7589.

Append a comma to the TSM key prefix when matching a full measurement name to avoid erroneously matching other measurement names that include the prefix in their own name. For example, this prevents matching a measurement "cpu1" when targeting "cpu" by updating the prefix to "cpu,". This relies on the fact that tag key-value pairs are separated by commas.

* fix(tsm1): regression tests for tsmKeyPrefix comma delimiting
2020-07-01 12:24:54 -04:00
Brett Buddin 0c268e205b
fix(storage): Push-down a predicate to match tags for SHOW MEASUREMENT calls (#18740)
* fix(storage): Push-down a predicate to match tags for SHOW MEASUREMENTS calls.

* chore: Address feedback.

* fix(tsm1): Split behavior based on existence of predicate for show measurements.

* fix(tsm1): Allow parenthesis expression on the LHS of a predicate.

* fix(tsm1): Create a separate tag predicate verifier that rejects negative comparisons.

* fix(tsm1): Additional test cases for show measurements with predicate.
2020-06-29 14:31:54 -04:00
Jonathan A. Sternberg 5aeca082c8
chore: update staticcheck and fix newly identified lint checks (#18737) 2020-06-26 18:54:09 -05:00
Ben Johnson 171f6586a0 fix(tsdb): Add refs for file-sourced tag keys
This commit adds ref counting for files that we pull tag keys from.
Previously, files were only ref counted during the time we extracted
tag keys but this commit adds additional ref counting for the life of
the `Engine.tagKeysNoPredicate()` function.
2020-06-17 10:27:23 -06:00
Ben Johnson 69fe9ed1ba
Merge pull request #17769 from patriczek/iss17257
fix: Migrated bucket should have correct retention policy.
2020-04-20 13:40:15 -06:00
Patrik Helia 07c89c9188 Fix fmt and reduce code
Signed-off-by: Patrik Helia <patrik.helia@kiwi.com>
2020-04-20 21:25:38 +02:00
Stuart Carnie c76f30682c
fix(storage): Feedback in response to PR review
* Adds clarifying documentation
* Regenerate protocol buffers with updated documentation
2020-04-16 15:19:28 -07:00
Stuart Carnie 6325591deb
feat(storage): New data types for measurement schema gRPC APIs
This commit

* adds new request and response data types for schema gRPC calls
* adds fmt.Stringer implementation to cursors.FieldType
* adds APIs to sort a slice of MeasurementField values,
* upgrades the gogo protobuf package to v1.3.1, which
  includes improvements to serialization.
2020-04-16 14:51:31 -07:00
Stuart Carnie 69820c08a4
feat(tsdb): Add maximum timestamp to MeasurementField
This is require in order to correctly merge results from multiple
sources.
2020-04-16 14:51:30 -07:00
Patrik Helia 7ce7e62f60 fix: Migrated bucket should have correct retention policy.
Signed-off-by: Patrik Helia <patashelia@gmail.com>
2020-04-16 21:35:48 +02:00
Stuart Carnie 21e339a32f
chore(storage): Fix documentation to reflect correct time interval 2020-04-14 11:04:56 -07:00
Stuart Carnie fe0ed6cb7e
feat(storage): Provide public MeasurementFields API 2020-04-14 10:49:16 -07:00
Stuart Carnie cb618efc65
feat(tsm1): Implementation of MeasurementFields
This commit provides an implementation of the MeasurementFields
API per the design previously outlined.
2020-04-08 16:15:34 -07:00
Stuart Carnie 7de6383adf
refactor(tsm1): Allow race-free access to cache
This commit adds a new API to `Cache` to address data races
with the `TagKeys` and `TagValues` APIs.

`Cache` and `entry` provide `AppendTimestamps`, which
appends the current timestamps to the provided slice
to reduce allocations. As noted in the documentation,
it is the responsibility of the caller to sort and deduplicate
the values, if required.

The `cursors.TimestampArray` type was extended to permit
use of the `sort.Sort` API.
2020-04-08 16:15:05 -07:00
Stuart Carnie 31df76e1e9
refactor(tsm1): Add TimeRangeMaxTimeIterator
This commit introduces a new API for finding the maximum
timestamp of a series when iterating over the keys in a
set of TSM files.

This API will be used to determine the field type of a single
field key by selecting the series with the maximum timestamp.

It has also refactored the common functionality for iterating
TSM keys into `timeRangeBlockReader`, which is shared
between `TimeRangeIterator` and `TimeRangeMaxTimeIterator`.
2020-04-08 16:05:19 -07:00