thanos-io/thanos · error
get attr of
Error message
get attr of %v
What it means
Wraps bkt.Attributes when the TSDB-based planner needs the index file size of a planned block that lacks a recorded file entry in its Thanos metadata. Querying the object for <block>/index attributes failed (network/auth error or missing object), so the size-based compaction heuristic cannot rank blocks.
Solutions
- Check bucket connectivity and credentials.
- Verify the index object exists in the bucket for that block ULID.
- Retry; transient object-store errors are common here.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at pkg/compact/planner.go:333 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/f0a79e52b0119a56.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/compact/planner.go:333
for {
plan, err := t.tsdbBasedPlanner.plan(copiedNoCompactMarked, metasByMinTime)
if err != nil {
return nil, err
}
var totalIndexBytes, maxIndexSize int64 = 0, math.MinInt64
var biggestIndex int
for i, p := range plan {
indexSize := int64(-1)
for _, f := range p.Thanos.Files {
if f.RelPath == block.IndexFilename {
indexSize = f.SizeBytes
}
}
if indexSize <= 0 {
// Get size from bkt instead.
attr, err := t.bkt.Attributes(ctx, filepath.Join(p.ULID.String(), block.IndexFilename))
if err != nil {
return nil, errors.Wrapf(err, "get attr of %v", filepath.Join(p.ULID.String(), block.IndexFilename))
}
indexSize = attr.Size
}
if maxIndexSize < indexSize {
maxIndexSize = indexSize
biggestIndex = i
}
totalIndexBytes += indexSize
// Leave 15% headroom for index compaction bloat.
if totalIndexBytes >= int64(float64(t.totalMaxIndexSizeBytes)*0.85) {
// Marking blocks for no compact to limit size.
// TODO(bwplotka): Make sure to reset cache once this is done: https://github.com/thanos-io/thanos/issues/3408
if err := block.MarkForNoCompact(
ctx,
t.logger,
t.bkt,
plan[biggestIndex].ULID,View on GitHub (pinned to 35b8b99117)