{"record":{"id":"3e79ccbeec526164","repo":"thanos-io/thanos","slug":"mark-v-for-v","errorCode":null,"errorMessage":"mark %v for %v","messagePattern":"mark (.+?) for (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/tools_bucket.go","lineNumber":1140,"sourceCode":"\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)\n\t\t\t\t}\n\t\t\t}\n\t\t\tlevel.Info(logger).Log(\"msg\", \"marking done\", \"marker\", tbc.marker, \"IDs\", strings.Join(tbc.blockIDs, \",\"))\n\t\t\treturn nil\n\t\t}, func(err error) {\n\t\t\tcancel()\n\t\t})","sourceCodeStart":1122,"sourceCodeEnd":1158,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/tools_bucket.go#L1122-L1158","documentation":"Wraps block.MarkForDeletion while writing a deletion mark: the object storage rejected uploading the mark file for this block (auth, network, or bucket error). The block ID and the marker filename are included so the failing write can be traced.","triggerScenarios":"Thrown at cmd/thanos/tools_bucket.go:1140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check object storage upload permissions","Inspect the wrapped error for network/credential causes","Retry the mark command"],"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"}