{"record":{"id":"fa2ff36fd9b8c989","repo":"thanos-io/thanos","slug":"fetch-overlaps-fa2ff3","errorCode":null,"errorMessage":"fetch overlaps","messagePattern":"fetch overlaps","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/verifier/overlapped_blocks.go","lineNumber":34,"sourceCode":"\t\"github.com/thanos-io/thanos/pkg/block\"\n)\n\n// OverlappedBlocksIssue checks bucket for blocks with overlapped time ranges.\n// No repair is available for this issue.\ntype OverlappedBlocksIssue struct{}\n\nfunc (OverlappedBlocksIssue) IssueID() string { return \"overlapped_blocks\" }\n\nfunc (OverlappedBlocksIssue) Verify(ctx Context, idMatcher func(ulid.ULID) bool) error {\n\tif idMatcher != nil {\n\t\treturn errors.Errorf(\"id matching is not supported\")\n\t}\n\n\tlevel.Info(ctx.Logger).Log(\"msg\", \"started verifying issue\")\n\n\toverlaps, err := fetchOverlaps(ctx, ctx.Fetcher)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"fetch overlaps\")\n\t}\n\n\tif len(overlaps) == 0 {\n\t\t// All good.\n\t\treturn nil\n\t}\n\n\tfor k, o := range overlaps {\n\t\tlevel.Warn(ctx.Logger).Log(\"msg\", \"found overlapped blocks\", \"group\", k, \"overlap\", o)\n\t}\n\treturn nil\n}\n\nfunc fetchOverlaps(ctx context.Context, fetcher block.MetadataFetcher) (map[string]tsdb.Overlaps, error) {\n\tmetas, _, err := fetcher.Fetch(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/verifier/overlapped_blocks.go#L16-L52","documentation":"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.","triggerScenarios":"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.","commonSituations":"Misconfigured objstore credentials; a bucket containing blocks with corrupt meta.json; network partition or DNS failure; bucket rate limiting during large listings.","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."],"exampleFix":"// before: verifier pointed at wrong bucket/prefix\n--objstore.config-file=staging-s3.yaml\n// after: correct bucket\n--objstore.config-file=prod-s3.yaml","handlingStrategy":"retry","validationCode":"// smoke-test bucket read access before running Verify\niter := bkt.Iter(ctx, \"\")\n_, err := iter.Next(ctx)","typeGuard":null,"tryCatchPattern":"if err := (verifier.OverlappedBlocksIssue{}).Verify(ctx, nil); err != nil {\n    if strings.Contains(err.Error(), \"fetch overlaps\") {\n        // backoff and retry; inspect wrapped fetcher cause for bad meta.json blocks\n    }\n}","preventionTips":["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"],"tags":["go","object-storage","fetch","metadata","thanos"],"backgroundTag":"http-request-failed","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}