{"record":{"id":"236b8eb743fd6ec5","repo":"thanos-io/thanos","slug":"remove-mark-v-for-v","errorCode":null,"errorMessage":"remove mark %v for %v","messagePattern":"remove mark (.+?) for (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/tools_bucket.go","lineNumber":1133,"sourceCode":"\t\tfor _, id := range tbc.blockIDs {\n\t\t\tu, err := ulid.Parse(id)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Errorf(\"block.id is not a valid UUID, got: %v\", id)\n\t\t\t}\n\t\t\tids = append(ids, u)\n\t\t}\n\n\t\tif !tbc.removeMarker && tbc.details == \"\" {\n\t\t\treturn errors.Errorf(\"required flag --details not provided\")\n\t\t}\n\n\t\tctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)\n\t\tg.Add(func() error {\n\t\t\tfor _, id := range ids {\n\t\t\t\tif tbc.removeMarker {\n\t\t\t\t\terr := block.RemoveMark(ctx, logger, insBkt, id, promauto.With(nil).NewCounter(prometheus.CounterOpts{}), tbc.marker)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"remove mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tswitch tbc.marker {\n\t\t\t\tcase metadata.DeletionMarkFilename:\n\t\t\t\t\tif err := block.MarkForDeletion(ctx, logger, insBkt, id, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\tcase metadata.NoCompactMarkFilename:\n\t\t\t\t\tif err := block.MarkForNoCompact(ctx, logger, insBkt, id, metadata.ManualNoCompactReason, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\tcase metadata.NoDownsampleMarkFilename:\n\t\t\t\t\tif err := block.MarkForNoDownsample(ctx, logger, insBkt, id, metadata.ManualNoDownsampleReason, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {\n\t\t\t\t\t\treturn errors.Wrapf(err, \"mark %v for %v\", id, tbc.marker)\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\treturn errors.Errorf(\"not supported marker %v\", tbc.marker)","sourceCodeStart":1115,"sourceCodeEnd":1151,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/tools_bucket.go#L1115-L1151","documentation":"Wraps block.RemoveMark in the mark-block command with --remove: the deletion/no-compact/no-downsample mark file for the given block could not be removed from object storage (network error, missing permissions). Both the block ID and the mark filename being removed are included.","triggerScenarios":"Thrown at cmd/thanos/tools_bucket.go:1133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check bucket write/delete permissions","Inspect the wrapped error for the storage cause","Retry after connectivity issues resolve"],"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"}