{"record":{"id":"6b9549aabd0157da","repo":"thanos-io/thanos","slug":"get-posting-offset-table-from-object-storage-of-s","errorCode":null,"errorMessage":"get posting offset table from object storage of %s","messagePattern":"get posting offset table from object storage of (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/block/indexheader/binary_reader.go","lineNumber":269,"sourceCode":"\nfunc (r *chunkedIndexReader) CopySymbols(w io.Writer, buf []byte) (err error) {\n\trc, err := r.bkt.GetRange(r.ctx, r.path, int64(r.toc.Symbols), int64(r.toc.Series-r.toc.Symbols))\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"get symbols from object storage of %s\", r.path)\n\t}\n\tdefer runutil.CloseWithErrCapture(&err, rc, \"close symbol reader\")\n\n\tif _, err := io.CopyBuffer(w, rc, buf); err != nil {\n\t\treturn errors.Wrap(err, \"copy symbols\")\n\t}\n\n\treturn nil\n}\n\nfunc (r *chunkedIndexReader) CopyPostingsOffsets(w io.Writer, buf []byte) (err error) {\n\trc, err := r.bkt.GetRange(r.ctx, r.path, int64(r.toc.PostingsTable), int64(r.size-r.toc.PostingsTable))\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"get posting offset table from object storage of %s\", r.path)\n\t}\n\tdefer runutil.CloseWithErrCapture(&err, rc, \"close posting offsets reader\")\n\n\tif _, err := io.CopyBuffer(w, rc, buf); err != nil {\n\t\treturn errors.Wrap(err, \"copy posting offsets\")\n\t}\n\n\treturn nil\n}\n\n// TODO(bwplotka): Add padding for efficient read.\ntype binaryWriter struct {\n\twriter PosWriter\n\n\ttoc BinaryTOC\n\n\t// Reusable memory.\n\tbuf encoding.Encbuf","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/indexheader/binary_reader.go#L251-L287","documentation":"CopyPostingsOffsets streams the postings offset table (bytes from toc.PostingsTable to end of file) from the index in object storage to the writer, again via a ranged GET. A failing GetRange is wrapped with this message — the posting offset table could not be fetched from the bucket.","triggerScenarios":"CopyPostingsOffsets when bkt.GetRange(ctx, path, toc.PostingsTable, size-toc.PostingsTable) errors: missing object, permissions, throttling, or an invalid range when toc.PostingsTable exceeds the real object size (corrupt TOC or truncated index).","commonSituations":"S3 InvalidRange on truncated index objects; IAM lacking GetObject on the prefix; throttling (503/SlowDown) during bulk header builds across many blocks; block removed by retention mid-copy.","solutions":["Check the wrapped error type: range/416 errors mean the index is truncated or the TOC is wrong — re-upload or restore the block.","Confirm IAM allows ranged GetObject; re-check bucket/prefix configuration.","Apply retries with backoff for transient storage errors (retrying bucket middleware).","Verify blocks with thanos tools bucket verify and quarantine corrupt ones."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if toc.PostingsTable >= uint64(attrs.Size) {\n    return fmt.Errorf(\"postings table offset %d beyond object %s\", toc.PostingsTable, path)\n}","typeGuard":null,"tryCatchPattern":"var apiErr s3types.NoSuchKey\nif errors.As(err, &apiErr) { /* block gone: re-sync */ }\nelse if isThrottling(err) { retry.WithBackoff(op) }","preventionTips":["Enable retry middleware on the objstore client for 503/SlowDown errors.","Verify blocks with bucket-verify tooling to catch truncated indexes early.","Ensure IAM GetObject on the prefix for the store-gateway role.","Stagger header builds across blocks to avoid storage throttling bursts."],"tags":["object-storage","range-request","thanos","postings"],"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"}