cleans up redundant setting of stream.unorderedWrites=true when replaying wal (#4595)

pull/4599/head
Owen Diehl 4 years ago committed by GitHub
parent 633b4cab53
commit 0c97afadbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      pkg/ingester/limiter.go
  2. 3
      pkg/ingester/recovery.go

@ -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
}

@ -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

Loading…
Cancel
Save