{"record":{"id":"abb8f8465a425b5a","repo":"thanos-io/thanos","slug":"read-postings-range","errorCode":null,"errorMessage":"read postings range","messagePattern":"read postings range","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/bucket.go","lineNumber":3214,"sourceCode":"\n\t\tstart := int64(part.Start)\n\t\t// We assume index does not have any ptrs that has 0 length.\n\t\tlength := int64(part.End) - start\n\n\t\t// Fetch from object storage concurrently and update stats and posting list.\n\t\tg.Go(func() error {\n\t\t\tbegin := time.Now()\n\t\t\tstats := new(queryStats)\n\t\t\tdefer func() {\n\t\t\t\tr.stats.merge(stats)\n\t\t\t}()\n\n\t\t\tbrdr := bufioReaderPool.Get().(*bufio.Reader)\n\t\t\tdefer bufioReaderPool.Put(brdr)\n\n\t\t\tpartReader, err := r.block.bkt.GetRange(ctx, r.block.indexFilename(), start, length)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrap(err, \"read postings range\")\n\t\t\t}\n\t\t\tdefer runutil.CloseWithLogOnErr(r.logger, partReader, \"readIndexRange close range reader\")\n\t\t\tbrdr.Reset(partReader)\n\n\t\t\trdr := newPostingsReaderBuilder(ctx, brdr, ptrs[i:j], start, length)\n\n\t\t\tstats.postingsFetchCount++\n\t\t\tstats.add(PostingsFetched, j-i, int(length))\n\n\t\t\tfor rdr.Next() {\n\t\t\t\tdiffVarintPostings, postingsCount, keyID := rdr.AtDiffVarint()\n\n\t\t\t\toutput[keyID] = newDiffVarintPostings(diffVarintPostings, nil)\n\n\t\t\t\tstartCompression := time.Now()\n\t\t\t\tdataToCache, err := snappyStreamedEncode(int(postingsCount), diffVarintPostings)\n\t\t\t\tif err != nil {\n\t\t\t\t\tstats.cachedPostingsCompressionErrors += 1","sourceCodeStart":3196,"sourceCodeEnd":3232,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/store/bucket.go#L3196-L3232","documentation":"The postings fetch path issues a ranged read (GetRange) against the bucket for a slice of the block's index file. This error wraps any failure of that object-storage ranged GET — network error, object not found, permission or throttling failure — while streaming the postings table portion of index.","triggerScenarios":"r.block.bkt.GetRange(ctx, r.block.indexFilename(), start, length) fails during Postings(): object storage unavailable/unreachable, index file deleted from the bucket, credentials lacking read permission, or bucket rate limiting (429/503).","commonSituations":"S3/GCS/Azure throttling under heavy fan-out queries; temporary network partition between store-gateway and object store; block deleted by compactor while being queried; expired/misconfigured storage credentials.","solutions":["Retry the query — bucket readers typically retry transient errors; check whether the failure was transient","Verify the block's index file still exists in the bucket and the block has not been deleted (deletion marks)","Check object-store credentials and permissions for reading the index object","Inspect storage provider metrics for throttling (429) and enable request pacing or increase limits"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"exists, err := bkt.Exists(ctx, block.indexFilename())\nif err != nil || !exists {\n\t// block index missing: resync bucket view before querying\n}","typeGuard":"func isRetryableGetRangeErr(err error) bool { return errors.Is(err, context.DeadlineExceeded) || isThrottle(err) || isNetTemporary(err) }","tryCatchPattern":"part, err := bkt.GetRange(ctx, name, start, length)\nif err != nil {\n\tif isRetryableGetRangeErr(err) { return retry.WithBackoff(...) }\n\treturn errors.Wrap(err, \"read postings range\")\n}","preventionTips":["Configure object-store request rate limits and retries in the bucket config","Check block deletion marks before serving","Use healthy, same-region object storage endpoints","Alert on object-store 5xx/429 error rates"],"tags":["thanos","object-storage","network","s3","index"],"backgroundTag":"network-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"}