{"record":{"id":"f0a79e52b0119a56","repo":"thanos-io/thanos","slug":"get-attr-of-v","errorCode":null,"errorMessage":"get attr of %v","messagePattern":"get attr of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compact/planner.go","lineNumber":333,"sourceCode":"\tfor {\n\t\tplan, err := t.tsdbBasedPlanner.plan(copiedNoCompactMarked, metasByMinTime)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvar totalIndexBytes, maxIndexSize int64 = 0, math.MinInt64\n\t\tvar biggestIndex int\n\t\tfor i, p := range plan {\n\t\t\tindexSize := int64(-1)\n\t\t\tfor _, f := range p.Thanos.Files {\n\t\t\t\tif f.RelPath == block.IndexFilename {\n\t\t\t\t\tindexSize = f.SizeBytes\n\t\t\t\t}\n\t\t\t}\n\t\t\tif indexSize <= 0 {\n\t\t\t\t// Get size from bkt instead.\n\t\t\t\tattr, err := t.bkt.Attributes(ctx, filepath.Join(p.ULID.String(), block.IndexFilename))\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, errors.Wrapf(err, \"get attr of %v\", filepath.Join(p.ULID.String(), block.IndexFilename))\n\t\t\t\t}\n\t\t\t\tindexSize = attr.Size\n\t\t\t}\n\n\t\t\tif maxIndexSize < indexSize {\n\t\t\t\tmaxIndexSize = indexSize\n\t\t\t\tbiggestIndex = i\n\t\t\t}\n\t\t\ttotalIndexBytes += indexSize\n\t\t\t// Leave 15% headroom for index compaction bloat.\n\t\t\tif totalIndexBytes >= int64(float64(t.totalMaxIndexSizeBytes)*0.85) {\n\t\t\t\t// Marking blocks for no compact to limit size.\n\t\t\t\t// TODO(bwplotka): Make sure to reset cache once this is done: https://github.com/thanos-io/thanos/issues/3408\n\t\t\t\tif err := block.MarkForNoCompact(\n\t\t\t\t\tctx,\n\t\t\t\t\tt.logger,\n\t\t\t\t\tt.bkt,\n\t\t\t\t\tplan[biggestIndex].ULID,","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/compact/planner.go#L315-L351","documentation":"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.","triggerScenarios":"Thrown at pkg/compact/planner.go:333 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}