Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

fix bigtable idx pruning + index-rules.conf pruning for bigtable idx #1114

Merged
merged 1 commit into from
Oct 26, 2018

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Oct 24, 2018

fix bigtable idx pruning + index-rules.conf pruning for bigtable idx

1) both the at-runtime pruning of the memory index, as well as the
   on-startup initialisation of the cassandra index group metrics by
   nameWithTags, whereas the on-startup init of the bigtable index
   did it by name.  So even if all defs for a.b;foo=bar are stale,
   bigtable idx wouldn't prune it if there's e.g.
   a non stale a.b;foo=quux, in contrast with cassandra and memory
   index which consider these separate series for pruning.
   We fix it here, and also clarify some things a bit, making
   the cassandra and bigtable index implementation on par and easily
   diffable.

2) implement index-rules.conf based pruning for bigtable idx,
   rather than the old max-stale mechanism.
   fix #1108

1) both the at-runtime pruning of the memory index, as well as the
   on-startup initialisation of the cassandra index group metrics by
   nameWithTags, whereas the on-startup init of the bigtable index
   did it by name.  So even if all defs for a.b;foo=bar are stale,
   bigtable idx wouldn't prune it if there's e.g.
   a non stale a.b;foo=quux, in contrast with cassandra and memory
   index which consider these separate series for pruning.
   We fix it here, and also clarify some things a bit, making
   the cassandra and bigtable index implementation on par and easily
   diffable.

2) implement index-rules.conf based pruning for bigtable idx,
   rather than the old max-stale mechanism.
   fix #1108
@Dieterbe Dieterbe changed the title WIP: port index-rules.conf pruning to bigtable idx plugin fix bigtable idx pruning + index-rules.conf pruning for bigtable idx Oct 26, 2018
@Dieterbe Dieterbe requested a review from woodsaj October 26, 2018 15:37
pruned, err := b.MemoryIdx.Prune(oldest)
statPruneDuration.Value(time.Since(pre))
func (b *BigtableIdx) Prune(now time.Time) ([]idx.Archive, error) {
log.Info("bigtable-idx: start pruning of series")
Copy link
Member

Choose a reason for hiding this comment

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

bigtable-idx: starting prune of series ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same thing no?

Copy link
Member

@woodsaj woodsaj left a comment

Choose a reason for hiding this comment

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

LGTM

@Dieterbe Dieterbe merged commit c769795 into master Oct 26, 2018
@Dieterbe Dieterbe deleted the index-rules-bigtable branch October 29, 2018 09:05
@Dieterbe
Copy link
Contributor Author

this doesn't break config because bigtable support hasn't been released yet

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

Successfully merging this pull request may close these issues.

None yet

2 participants