Commit Graph

11 Commits (e616e0fee423fdd27f680470248113121fa9afd2)

Author SHA1 Message Date
Stuart Carnie 9964312bad
feat(cursors): Implement Size method so it doesn't panic
Returns the size (in bytes) of the associated array. Used by
the reads.ResponseWriter to estimate the size of buffered data.
2019-08-16 10:34:43 -07:00
Stuart Carnie 7b97a41dcb
feat(storage): Teach TagKeys, TagValues how to accumulate statistics
This commit teaches the storage schema APIs how to track statistics
and make them available via the returned `cursors.StringIterator`.

Statistics are only tracked when decoding TSM blocks or when scanning
the in-memory cache.

Closes #13541
2019-04-24 11:14:22 -07:00
Stuart Carnie d5341a1a4a
feedback: Fix comments in template 2019-04-18 16:19:19 -07:00
Stuart Carnie 972cda1775
feedback: Changes in response to PR feedback 2019-04-18 16:19:18 -07:00
Stuart Carnie 36a33bcb9f
feat(tsdb): Teach storage how to only decode timestamps from a block
TimestampArray.Contains(min,max) API performs a binary search to
determine if timestamps exist for the given time interval.

It also implements Exclude to drop timestamps that have been tombstoned.

DecodeTimestampArrayBlock decodes only the timestamps of the provided
block.
2019-04-18 16:19:18 -07:00
Stuart Carnie 7fc9661b7b
chore: Move StringIterator to cursors package for wider reuse 2019-04-18 16:19:17 -07:00
Stuart Carnie e74f2f8e08
chore(cursors): Remove unused field 2019-04-18 16:19:17 -07:00
Stuart Carnie d67b1ef245
fix(cursors): Add go:generate directive 2019-04-18 16:19:17 -07:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Ben Johnson 1862b4421d
Integrate scanned values statistics tracking. 2018-11-28 15:32:06 -07:00
Jeff Wendling 810833f33f chore: refactor reads service and make it consumable externally
This pulls in the code that allows doing reads with flux into the
platform repo, and removes extra.go.

The reusable portion is under storage/reads, where the concrete
implementation for one of the platform's engines is in
storage/readservice.

In order to make this more reusable, the cursors had to move into
their own package, decoupling it from all of the other code in the
tsdb package. tsdb/cursors is this new package, and type/function
aliases have been added to the tsdb package to point at it.

The models package already is very light on transitive dependencies
and so it was allowed to be depended on in a concrete way in the
cursors package.

Finally, the protobuf definitions for issuing GRPC reads has been
moved into its own package for two reasons:
    1. It's a clean separation, and helps keep it that way.
    2. Many/most consumers will not be using GRPC. We just
       use the datatypes to express the API which helps making
       a GRPC server easier.
It is left up to future refactorings (specifically ones that involve
GPRC) to determine if these types should remain, or if there is a
cleaner way.

There's still some dependencies on both github.com/influxdata/influxql
and github.com/influxdata/influxdb/logger that we can hopefully remove
in future refactorings.
2018-10-09 09:51:13 -06:00