{"record":{"id":"3b3fdc8400a51665","repo":"thanos-io/thanos","slug":"group-s","errorCode":null,"errorMessage":"group %s","messagePattern":"group %s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compact/compact.go","lineNumber":1558,"sourceCode":"\t\t\t\t\t}\n\t\t\t\t\t// If block has out of order chunk and it has been configured to skip it,\n\t\t\t\t\t// then we can mark the block for no compaction so that the next compaction run\n\t\t\t\t\t// will skip it.\n\t\t\t\t\tif IsOutOfOrderChunkError(err) && c.skipBlocksWithOutOfOrderChunks {\n\t\t\t\t\t\tif err := block.MarkForNoCompact(\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\tc.logger,\n\t\t\t\t\t\t\tc.bkt,\n\t\t\t\t\t\t\terr.(OutOfOrderChunksError).id,\n\t\t\t\t\t\t\tmetadata.OutOfOrderChunksNoCompactReason,\n\t\t\t\t\t\t\t\"OutofOrderChunk: marking block with out-of-order series/chunks to as no compact to unblock compaction\", g.blocksMarkedForNoCompact); err == nil {\n\t\t\t\t\t\t\tmtx.Lock()\n\t\t\t\t\t\t\tfinishedAllGroups = false\n\t\t\t\t\t\t\tmtx.Unlock()\n\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\terrChan <- errors.Wrapf(err, \"group %s\", g.Key())\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\t// Blocks that were compacted are garbage collected after each Compaction.\n\t\t// However if compactor crashes we need to resolve those on startup.\n\t\tlevel.Info(c.logger).Log(\"msg\", \"start initial sync of metas\")\n\t\tif err := c.sy.SyncMetas(ctx); err != nil {\n\t\t\treturn errors.Wrap(err, \"sync\")\n\t\t}\n\n\t\tvar ignoreBlocks map[ulid.ULID]struct{}\n\t\tif c.blocksCleaner != nil {\n\t\t\tdeletedBlocks, err := c.blocksCleaner.DeleteMarkedBlocks(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrap(err, \"cleaning marked blocks\")\n\t\t\t}","sourceCodeStart":1540,"sourceCodeEnd":1576,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/compact/compact.go#L1540-L1576","documentation":"Compacting a specific group failed with an error other than the handled out-of-order-chunks case; the error is tagged with the group key and sent to errChan, failing the compaction run for that cycle.","triggerScenarios":"Thrown at pkg/compact/compact.go:1558 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped group error for the root cause","Check for corrupt blocks in the group","Re-run compaction after fixing the issue"],"exampleFix":null,"handlingStrategy":"try-catch","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"}