{"record":{"id":"82a498127407d95f","repo":"thanos-io/thanos","slug":"mark-v-for-no-compaction","errorCode":null,"errorMessage":"mark %v for no compaction","messagePattern":"mark (.+?) for no compaction","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compact/planner.go","lineNumber":284,"sourceCode":"\t\t}\n\n\t\t// If we have downsampled blocks, we need to mark them as no compact because it's impossible to do that with vertical compaction.\n\t\t// Technically, the resolution is part of the group key but do not attach ourselves to that level of detail.\n\t\tvar marked = false\n\t\tfor _, m := range plan {\n\t\t\tif m.Thanos.Downsample.Resolution == 0 {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif err := block.MarkForNoCompact(\n\t\t\t\tctx,\n\t\t\t\tv.logger,\n\t\t\t\tv.bkt,\n\t\t\t\tm.ULID,\n\t\t\t\tmetadata.DownsampleVerticalCompactionNoCompactReason,\n\t\t\t\t\"verticalCompactionDownsampleFilter: Downsampled block, see https://github.com/thanos-io/thanos/issues/6775\",\n\t\t\t\tv.markedForNoCompact,\n\t\t\t); err != nil {\n\t\t\t\treturn nil, errors.Wrapf(err, \"mark %v for no compaction\", m.ULID.String())\n\t\t\t}\n\t\t\tnoCompactMarked[m.ULID] = &metadata.NoCompactMark{ID: m.ULID, Version: metadata.NoCompactMarkVersion1}\n\t\t\tmarked = true\n\t\t}\n\n\t\tif marked {\n\t\t\tcontinue PlanLoop\n\t\t}\n\n\t\treturn plan, nil\n\n\t}\n}\n\n// WithLargeTotalIndexSizeFilter wraps Planner with largeTotalIndexSizeFilter that checks the given plans and estimates total index size.\n// When found, it marks block for no compaction by placing no-compact-mark.json and updating cache.\n// NOTE: The estimation is very rough as it assumes extreme cases of indexes sharing no bytes, thus summing all source index sizes.\n// Adjust limit accordingly reducing to some % of actual limit you want to give.","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/compact/planner.go#L266-L302","documentation":"During vertical compaction planning, marking a downsampled block (resolution > 0) as no-compact via block.MarkForNoCompact failed — typically a bucket write error — so the planner cannot guarantee the block stays out of vertical compaction.","triggerScenarios":"Thrown at pkg/compact/planner.go:284 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for bucket connectivity/permissions.","Retry the planning operation.","Verify the object store allows writing marker objects for the block."],"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"}