thanos-io/thanos · error
fetch overlaps
Error message
fetch overlaps
What it means
Verification of the overlapped_blocks issue could not even start: fetchOverlaps failed while listing/fetching block metadata from the bucket (listing error, unreadable meta.json, or context cancellation). It is a wrapper that attributes the failure to the overlap-analysis stage, not a finding of overlap itself.
Solutions
- Inspect the wrapped fetcher error for the failing block ID or list operation.
- Validate objstore config and credentials; test with 'thanos tools bucket ls'.
- Find and fix/remove the block with malformed meta.json that breaks metadata parsing.
- Retry after transient network issues; configure fetcher concurrency/retries appropriately.
Example fix
// before: verifier pointed at wrong bucket/prefix --objstore.config-file=staging-s3.yaml // after: correct bucket --objstore.config-file=prod-s3.yaml
Defensive patterns
Strategy: retry
Validate before calling
// smoke-test bucket read access before running Verify iter := bkt.Iter(ctx, "") _, err := iter.Next(ctx)
Try / catch
if err := (verifier.OverlappedBlocksIssue{}).Verify(ctx, nil); err != nil {
if strings.Contains(err.Error(), "fetch overlaps") {
// backoff and retry; inspect wrapped fetcher cause for bad meta.json blocks
}
} Prevention
- Validate objstore config/credentials with 'thanos tools bucket ls' first
- Remove or fix blocks with corrupt meta.json in the bucket
- Configure fetcher retries/concurrency for large buckets
When it happens
Trigger: ctx.Fetcher (a bucket metadata fetcher) errors: object store unreachable, GetObject/permission failure reading meta.json files, malformed meta.json causing unmarshal failure, or listing errors on the bucket.
Common situations: Misconfigured objstore credentials; a bucket containing blocks with corrupt meta.json; network partition or DNS failure; bucket rate limiting during large listings.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/fa2ff36fd9b8c989.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/verifier/overlapped_blocks.go:34
"github.com/thanos-io/thanos/pkg/block"
)
// OverlappedBlocksIssue checks bucket for blocks with overlapped time ranges.
// No repair is available for this issue.
type OverlappedBlocksIssue struct{}
func (OverlappedBlocksIssue) IssueID() string { return "overlapped_blocks" }
func (OverlappedBlocksIssue) Verify(ctx Context, idMatcher func(ulid.ULID) bool) error {
if idMatcher != nil {
return errors.Errorf("id matching is not supported")
}
level.Info(ctx.Logger).Log("msg", "started verifying issue")
overlaps, err := fetchOverlaps(ctx, ctx.Fetcher)
if err != nil {
return errors.Wrap(err, "fetch overlaps")
}
if len(overlaps) == 0 {
// All good.
return nil
}
for k, o := range overlaps {
level.Warn(ctx.Logger).Log("msg", "found overlapped blocks", "group", k, "overlap", o)
}
return nil
}
func fetchOverlaps(ctx context.Context, fetcher block.MetadataFetcher) (map[string]tsdb.Overlaps, error) {
metas, _, err := fetcher.Fetch(ctx)
if err != nil {
return nil, err
}View on GitHub (pinned to 35b8b99117)