Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* `cortex_bucket_stores_gate_queries_concurrent_max`
* `cortex_bucket_stores_gate_queries_in_flight`
* `cortex_bucket_stores_gate_duration_seconds`
* [CHANGE] Metric `cortex_ingester_flush_reasons` has been renamed to `cortex_ingester_flushing_enqueued_series_total`, and new metric `cortex_ingester_flushing_dequeued_series_total` with `outcome` label (superset of reason) has been added. #2802, #2818
* [CHANGE] Metric `cortex_ingester_flush_reasons` has been renamed to `cortex_ingester_flushing_enqueued_series_total`, and new metric `cortex_ingester_flushing_dequeued_series_total` with `outcome` label (superset of reason) has been added. #2802 #2818 #2998
* [CHANGE] Experimental Delete Series: Metric `cortex_purger_oldest_pending_delete_request_age_seconds` would track age of delete requests since they are over their cancellation period instead of their creation time. #2806
* [CHANGE] Experimental blocks storage: the store-gateway service is required in a Cortex cluster running with the experimental blocks storage. Removed the `-experimental.tsdb.store-gateway-enabled` CLI flag and `store_gateway_enabled` YAML config option. The store-gateway is now always enabled when the storage engine is `blocks`. #2822
* [CHANGE] Experimental blocks storage: removed support for `-experimental.blocks-storage.bucket-store.max-sample-count` flag because the implementation was flawed. To limit the number of samples/chunks processed by a single query you can set `-store.query-chunk-limit`, which is now supported by the blocks storage too. #2852
Expand Down
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