Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/ingester/flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const (
noSeries
noChunks
flushError
reasonDropped
maxFlushReason // Used for testing String() method. Should be last.
)

Expand Down Expand Up @@ -138,6 +139,8 @@ func (f flushReason) String() string {
return "NoChunksToFlush"
case flushError:
return "FlushError"
case reasonDropped:
return "Dropped"
default:
panic("unrecognised flushReason")
}
Expand Down Expand Up @@ -307,12 +310,17 @@ func (i *Ingester) flushUserSeries(flushQueueIndex int, userID string, fp model.
"queue", flushQueueIndex,
)
chunks = nil
reason = reasonDropped
}
}
}

userState.fpLocker.Unlock(fp)

if reason == reasonDropped {
return reason, nil
}

// No need to flush these chunks again.
for len(chunks) > 0 && chunks[0].flushed {
chunks = chunks[1:]
Expand Down