thanos-io/thanos · error
non-sequential chunks not equal
Error message
non-sequential chunks not equal: %x and %x
What it means
A data-integrity guard in IgnoreDuplicateOutsideChunk: two chunks overlap in time (curr.MinTime <= last.MaxTime) but are not exact duplicates — their [mint,maxt] windows differ, or (in the sibling checksum branch) their bytes hash differently. Deduplication by discarding the later chunk would lose data, so the repair is refused rather than silently corrupting the block.
Solutions
- Treat as data divergence — investigate replica sources
- Prefer vertical compaction to keep both copies
- Avoid manual chunk dropping
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/block/index.go:523 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/afe222c6f8e59b5a.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/block/index.go:523
if last == nil {
return false, nil
}
if curr.MinTime > last.MaxTime {
return false, nil
}
// Verify that the overlapping chunks are exact copies so we can safely discard
// the current one.
if curr.MinTime != last.MinTime || curr.MaxTime != last.MaxTime {
return false, errors.Errorf("non-sequential chunks not equal: [%d, %d] and [%d, %d]",
last.MinTime, last.MaxTime, curr.MinTime, curr.MaxTime)
}
ca := crc32.Checksum(last.Chunk.Bytes(), castagnoli)
cb := crc32.Checksum(curr.Chunk.Bytes(), castagnoli)
if ca != cb {
return false, errors.Errorf("non-sequential chunks not equal: %x and %x", ca, cb)
}
return true, nil
}
// sanitizeChunkSequence ensures order of the input chunks and drops any duplicates.
// It errors if the sequence contains non-dedupable overlaps.
func sanitizeChunkSequence(chks []chunks.Meta, mint, maxt int64, ignoreChkFns []ignoreFnType) ([]chunks.Meta, error) {
if len(chks) == 0 {
return nil, nil
}
// First, ensure that chunks are ordered by their start time.
sort.Slice(chks, func(i, j int) bool {
return chks[i].MinTime < chks[j].MinTime
})
// Remove duplicates, complete outsiders and near outsiders.
repl := make([]chunks.Meta, 0, len(chks))View on GitHub (pinned to 35b8b99117)