You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let store-gateways ignore blocks that are too young. (#502)
* Let store-gateways ignore blocks that are too young.
Signed-off-by: Peter Štibraný <[email protected]>
* CHANGELOG.md
Signed-off-by: Peter Štibraný <[email protected]>
* Renamed TimeMetaFilter to minTimeMetaFilter, added it to TestBucketIndexMetadataFetcher_Fetch test.
Signed-off-by: Peter Štibraný <[email protected]>
* Unexport NewMinTimeMetaFilter.
Signed-off-by: Peter Štibraný <[email protected]>
* Enhanced field description.
Signed-off-by: Peter Štibraný <[email protected]>
* Fix wording as suggested by Arve.
Signed-off-by: Peter Štibraný <[email protected]>
* Address review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
* Address review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
* Fix tests after changing label value.
Signed-off-by: Peter Štibraný <[email protected]>
*[ENHANCEMENT] Store-gateway: store-gateway can now ignore blocks with minimum time within `-blocks-storage.bucket-store.ignore-blocks-within` duration. Useful when used together with `-querier.query-store-after`. #502
120
121
*[BUGFIX] Frontend: Fixes @ modifier functions (start/end) when splitting queries by time. #206
121
122
*[BUGFIX] Fixes a panic in the query-tee when comparing result. #207
122
123
*[BUGFIX] Upgrade Prometheus. TSDB now waits for pending readers before truncating Head block, fixing the `chunk not found` error and preventing wrong query results. #16
f.DurationVar(&cfg.IgnoreDeletionMarksDelay, "blocks-storage.bucket-store.ignore-deletion-marks-delay", time.Hour*6, "Duration after which the blocks marked for deletion will be filtered out while fetching blocks. "+
306
307
"The idea of ignore-deletion-marks-delay is to ignore blocks that are marked for deletion with some delay. This ensures store can still serve blocks that are meant to be deleted but do not have a replacement yet. "+
307
308
"Default is 6h, half of the default value for -compactor.deletion-delay.")
309
+
f.DurationVar(&cfg.IgnoreBlocksWithin, "blocks-storage.bucket-store.ignore-blocks-within", 0, "Blocks with minimum time within this duration are ignored, and not loaded by store-gateway. Useful when used together with -querier.query-store-after to prevent loading young blocks, because there are usually many of them (depending on number of ingesters) and they are not yet compacted. Negative values or 0 disable the filter.")
308
310
f.IntVar(&cfg.PostingOffsetsInMemSampling, "blocks-storage.bucket-store.posting-offsets-in-mem-sampling", DefaultPostingOffsetInMemorySampling, "Controls what is the ratio of postings offsets that the store will hold in memory.")
309
311
f.BoolVar(&cfg.IndexHeaderLazyLoadingEnabled, "blocks-storage.bucket-store.index-header-lazy-loading-enabled", false, "If enabled, store-gateway will lazy load an index-header only once required by a query.")
310
312
f.DurationVar(&cfg.IndexHeaderLazyLoadingIdleTimeout, "blocks-storage.bucket-store.index-header-lazy-loading-idle-timeout", 20*time.Minute, "If index-header lazy loading is enabled and this setting is > 0, the store-gateway will offload unused index-headers after 'idle timeout' inactivity.")
block4:=&bucketindex.Block{ID: ulid.MustNew(4, nil), MinTime: timestamp.FromTime(now.Add(-30*time.Minute))} // Has most-recent data, to be ignored by minTimeMetaFilter.
48
+
46
49
mark1:=&bucketindex.BlockDeletionMark{ID: block1.ID, DeletionTime: now.Add(-time.Hour).Unix()} // Below the ignore delay threshold.
47
50
mark2:=&bucketindex.BlockDeletionMark{ID: block2.ID, DeletionTime: now.Add(-3*time.Hour).Unix()} // Above the ignore delay threshold.
0 commit comments