Skip to content

Commit 2b88800

Browse files
committed
fix ooo blocks shipping
Signed-off-by: Ben Ye <benye@amazon.com>
1 parent 8787996 commit 2b88800

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
* [BUGFIX] Fix bug on objstore when configured to use S3 fips endpoints. #5540
9292
* [BUGFIX] Ruler: Fix bug on ruler where a failure to load a single RuleGroup would prevent rulers to sync all RuleGroup. #5563
9393
* [BUGFIX] Store-Gateway and AlertManager: Add a `wait_instance_time_out` to WaitInstanceState context to avoid waiting forever. #5581
94+
* [BUGFIX] Ingester: Allow shipper to upload compacted blocks when out of order samples is enabled. #5416
9495

9596
## 1.15.1 2023-04-26
9697

pkg/ingester/ingester.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ func (i *Ingester) createTSDB(userID string) (*userTSDB, error) {
19671967
if maxExemplarsForUser > 0 {
19681968
enableExemplars = true
19691969
}
1970-
oooTimeWindow := i.limits.OutOfOrderTimeWindow(userID)
1970+
oooTimeWindow := time.Duration(i.limits.OutOfOrderTimeWindow(userID)).Milliseconds()
19711971
walCompressType := wlog.CompressionNone
19721972
// TODO(yeya24): expose zstd compression for WAL.
19731973
if i.cfg.BlocksStorageConfig.TSDB.WALCompressionEnabled {
@@ -2044,8 +2044,8 @@ func (i *Ingester) createTSDB(userID string) (*userTSDB, error) {
20442044
func() labels.Labels { return l },
20452045
metadata.ReceiveSource,
20462046
func() bool {
2047-
return oooTimeWindow > 0 // Upload compacted blocks when OOO is enabled.
2048-
},
2047+
return time.Duration(i.limits.OutOfOrderTimeWindow(userID)).Milliseconds() > 0
2048+
}, // No need to upload compacted blocks unless out of order samples is enabled.
20492049
true, // Allow out of order uploads. It's fine in Cortex's context.
20502050
metadata.NoneFunc,
20512051
)

0 commit comments

Comments
 (0)