Skip to content

Commit

Permalink
cleans up redundant setting of stream.unorderedWrites=true when repla…
Browse files Browse the repository at this point in the history
…ying wal (#4595)
  • Loading branch information
owen-d authored Oct 29, 2021
1 parent 633b4ca commit 0c97afa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions pkg/ingester/limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func NewLimiter(limits *validation.Overrides, metrics *ingesterMetrics, ring Rin
func (l *Limiter) UnorderedWrites(userID string) bool {
// WAL replay should not discard previously ack'd writes,
// so allow out of order writes while the limiter is disabled.
// This allows replaying unordered WALs into ordered configurations.
if l.disabled {
return true
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/ingester/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ func (r *ingesterRecoverer) Series(series *Series) error {
stream.lastLine.content = series.LastLine
stream.entryCt = series.EntryCt
stream.highestTs = series.HighestTs
// Always set during replay, then reset to desired value afterward.
// This allows replaying unordered WALs into ordered configurations.
stream.unorderedWrites = true

if err != nil {
return err
Expand Down

0 comments on commit 0c97afa

Please sign in to comment.