Skip to content

Commit

Permalink
fix ooo blocks shipping
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 committed Oct 18, 2023
1 parent 8787996 commit 2b88800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
* [BUGFIX] Fix bug on objstore when configured to use S3 fips endpoints. #5540
* [BUGFIX] Ruler: Fix bug on ruler where a failure to load a single RuleGroup would prevent rulers to sync all RuleGroup. #5563
* [BUGFIX] Store-Gateway and AlertManager: Add a `wait_instance_time_out` to WaitInstanceState context to avoid waiting forever. #5581
* [BUGFIX] Ingester: Allow shipper to upload compacted blocks when out of order samples is enabled. #5416

## 1.15.1 2023-04-26

Expand Down
6 changes: 3 additions & 3 deletions pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ func (i *Ingester) createTSDB(userID string) (*userTSDB, error) {
if maxExemplarsForUser > 0 {
enableExemplars = true
}
oooTimeWindow := i.limits.OutOfOrderTimeWindow(userID)
oooTimeWindow := time.Duration(i.limits.OutOfOrderTimeWindow(userID)).Milliseconds()
walCompressType := wlog.CompressionNone
// TODO(yeya24): expose zstd compression for WAL.
if i.cfg.BlocksStorageConfig.TSDB.WALCompressionEnabled {
Expand Down Expand Up @@ -2044,8 +2044,8 @@ func (i *Ingester) createTSDB(userID string) (*userTSDB, error) {
func() labels.Labels { return l },
metadata.ReceiveSource,
func() bool {
return oooTimeWindow > 0 // Upload compacted blocks when OOO is enabled.
},
return time.Duration(i.limits.OutOfOrderTimeWindow(userID)).Milliseconds() > 0
}, // No need to upload compacted blocks unless out of order samples is enabled.
true, // Allow out of order uploads. It's fine in Cortex's context.
metadata.NoneFunc,
)
Expand Down

0 comments on commit 2b88800

Please sign in to comment.