chore!: Remove deprecated per-tenant setting unordered_writes - #21835
Conversation
The setting `unordered_writes` was deprecated and defaulted to `true`. Now it has been removed. Please use the `deprecated-config-checker` tool to validate your `config.yaml`.
|
💻 Deploy preview deleted (chore!: Remove deprecated per-tenant setting |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Unused function
headBlockTypeleft as dead code- Removed the unreferenced private
headBlockTypehelper frompkg/ingester/stream.go.
- Removed the unreferenced private
Or push these changes by commenting:
@cursor push 775a784284
Preview (775a784284)
diff --git a/pkg/ingester/stream.go b/pkg/ingester/stream.go
--- a/pkg/ingester/stream.go
+++ b/pkg/ingester/stream.go
@@ -645,15 +645,6 @@
s.tailers[t.getID()] = t
}
-func headBlockType(chunkfmt byte, unorderedWrites bool) chunkenc.HeadBlockFmt {
- if unorderedWrites {
- if chunkfmt >= chunkenc.ChunkFormatV3 {
- return chunkenc.ChunkHeadFormatFor(chunkfmt)
- }
- }
- return chunkenc.OrderedHeadBlockFmt
-}
-
func labelsEqual(a, b pushtypes.LabelsAdapter) bool {
if len(a) != len(b) {
return falseYou can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 1721b6e. Configure here.
| The `too_far_behind` validation error is returned when lines in question are older than half of `-ingester.max-chunk-age` compared to the newest line in the stream. | ||
|
|
||
| This validation error is returned when a stream is submitted out of order. More details can be found [here](/docs/loki/<LOKI_VERSION>/configuration/#accept-out-of-order-writes) about the Loki ordering constraints. | ||
| This problem can be solved by ensuring that log delivery is configured correctly. |
There was a problem hiding this comment.
"is configured correctly" isn't very helpful. Can we restore the link to #accept out of order writes please?
There was a problem hiding this comment.
Or explain what "configured correctly" looks like with an example?
There was a problem hiding this comment.
I think I need to remove the section "Accept out-of-order writes" from the configuration page, since it references the now removed setting.
There was a problem hiding this comment.
Ok, so I updated the "Accept out-of-order writes" section and keep the link on this page.
Co-authored-by: J Stickler <julie.stickler@grafana.com> Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
Co-authored-by: Ashwanth <iamashwanth@gmail.com> Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
The setting unordered_writes was deprecated and defaulted to true. Now it has been removed. Please use the deprecated-config-checker tool to validate your config.yaml. Signed-off-by: Christian Haudum <christian.haudum@gmail.com> Co-authored-by: J Stickler <julie.stickler@grafana.com> Co-authored-by: Ashwanth <iamashwanth@gmail.com>


Summary
The setting
unordered_writeswas deprecated and defaulted totrue. Now it has been removed.Please use the
deprecated-config-checkertool to validate yourconfig.yaml.Note
Medium Risk
Removes a previously user-configurable ingestion behavior and changes validation/metric labeling around out-of-order data, which can affect upgrade compatibility and operational alerting.
Overview
Loki no longer supports configuring
unordered_writes(global or per-tenant): the limit/CLI flag and override plumbing are removed, stream creation no longer carries anunorderedWritesmode, and WAL recovery no longer includes logic to convert unordered→ordered head blocks.Ingestion validation is simplified to always enforce the
max_chunk_age/2cutoff for old entries and to always report discards asreason=too_far_behind(removingout_of_order), with docs and troubleshooting guidance updated and thedeprecated-config-checkerupdated to flaglimits_config.unordered_writesand per-tenant override usage as removed.Reviewed by Cursor Bugbot for commit 4722a23. Bugbot is set up for automated code reviews on this repo. Configure here.