{"record":{"id":"5e7c34b7e1542718","repo":"thanos-io/thanos","slug":"requested-to-remove-the-mark-but-file-does-not-ex","errorCode":null,"errorMessage":"requested to remove the mark, but file does not exist","messagePattern":"requested to remove the mark, but file does not exist","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/block/block.go","lineNumber":452,"sourceCode":"\t}\n\n\tif err := bkt.Upload(ctx, m, bytes.NewBuffer(noDownsampleMark)); err != nil {\n\t\treturn errors.Wrapf(err, \"upload file %s to bucket\", m)\n\t}\n\tmarkedForNoDownsample.Inc()\n\tlevel.Info(logger).Log(\"msg\", \"block has been marked for no downsample\", \"block\", id)\n\treturn nil\n}\n\n// RemoveMark removes the file which marked the block for deletion, no-downsample or no-compact.\nfunc RemoveMark(ctx context.Context, logger log.Logger, bkt objstore.Bucket, id ulid.ULID, removeMark prometheus.Counter, markedFilename string) error {\n\tmarkedFile := path.Join(id.String(), markedFilename)\n\tmarkedFileExists, err := bkt.Exists(ctx, markedFile)\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"check if %s file exists in bucket\", markedFile)\n\t}\n\tif !markedFileExists {\n\t\tlevel.Warn(logger).Log(\"msg\", \"requested to remove the mark, but file does not exist\", \"err\", errors.Errorf(\"file %s does not exist in bucket\", markedFile))\n\t\treturn nil\n\t}\n\tif err := bkt.Delete(ctx, markedFile); err != nil {\n\t\treturn errors.Wrapf(err, \"delete file %s from bucket\", markedFile)\n\t}\n\tremoveMark.Inc()\n\tlevel.Info(logger).Log(\"msg\", \"mark has been removed from the block\", \"block\", id)\n\treturn nil\n}\n","sourceCodeStart":434,"sourceCodeEnd":462,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/block.go#L434-L462","documentation":"RemoveMark found no marker file to remove — the requested mark (deletion/no-compact/no-downsample) does not exist on the block. This is a sentinel-condition message for idempotency/awareness, not a storage failure.","triggerScenarios":"Thrown at pkg/block/block.go:452 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Nothing to remove — verify the block ID and marker type","List block files to confirm current marks"],"exampleFix":null,"handlingStrategy":"type-guard","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"}