Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block storage query time filtering #2

Open
wants to merge 10 commits into
base: block_deletion_endpoints
Choose a base branch
from

Conversation

ilangofman
Copy link
Owner

@ilangofman ilangofman commented Jul 29, 2021

Signed-off-by: ilangofman [email protected]

What this PR does:

As part of the series deletion API proposal using block storage, this PR is responsible for implementing the query time filtering.

From the compactor, it writes to the bucket index the tombstones that are required for filtering. Afterwards, the queriers load the tombstones and apply the filtering using them.

Note: this is only implemented using the bucket index. If it is not enabled, then the query time filtering will not work (as per the proposal).

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

pkg/querier/blocks_store_queryable.go Outdated Show resolved Hide resolved
pkg/querier/blocks_store_queryable_test.go Outdated Show resolved Hide resolved
pkg/storage/tsdb/bucketindex/index.go Outdated Show resolved Hide resolved
pkg/storage/tsdb/bucketindex/updater.go Outdated Show resolved Hide resolved
pkg/storage/tsdb/bucketindex/updater.go Outdated Show resolved Hide resolved
pkg/storage/tsdb/tombstones.go Outdated Show resolved Hide resolved
pkg/storage/tsdb/bucketindex/updater.go Outdated Show resolved Hide resolved
return t, nil
}

func (w *Updater) isTombstoneForFiltering(t *cortex_tsdb.Tombstone) bool {
Copy link

@harry671003 harry671003 Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be in tombstones.go?

bkt: bucket.NewUserBucketClient(userID, bkt, cfgProvider),
logger: util_log.WithUserID(userID, logger),
bkt: bucket.NewUserBucketClient(userID, bkt, cfgProvider),
blocksDeletionDelay: deletionDelay,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these only used in isTombstoneForFiltering(). I don't think that method should belong in this class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants