thanos-io/thanos · error

not supported marker

Error message

not supported marker %v

What it means

A switch-default guard in the mark-block command: tbc.marker (from the --marker flag) names a mark file type other than deletion-mark.json or no-compact-mark.json, so the tool has no marking routine for it. Pure input-validation failure on the flag value.

Solutions

  1. Use one of: deletion-mark.json, no-compact-mark.json, no-downsample-mark.json
  2. Check the --marker flag for typos
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/thanos/tools_bucket.go:1151 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/cad49ef5a63f3ba3. Report an issue: GitHub.

Appendix: source

Thrown at cmd/thanos/tools_bucket.go:1151

						return errors.Wrapf(err, "remove mark %v for %v", id, tbc.marker)
					}
					continue
				}
				switch tbc.marker {
				case metadata.DeletionMarkFilename:
					if err := block.MarkForDeletion(ctx, logger, insBkt, id, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {
						return errors.Wrapf(err, "mark %v for %v", id, tbc.marker)
					}
				case metadata.NoCompactMarkFilename:
					if err := block.MarkForNoCompact(ctx, logger, insBkt, id, metadata.ManualNoCompactReason, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {
						return errors.Wrapf(err, "mark %v for %v", id, tbc.marker)
					}
				case metadata.NoDownsampleMarkFilename:
					if err := block.MarkForNoDownsample(ctx, logger, insBkt, id, metadata.ManualNoDownsampleReason, tbc.details, promauto.With(nil).NewCounter(prometheus.CounterOpts{})); err != nil {
						return errors.Wrapf(err, "mark %v for %v", id, tbc.marker)
					}
				default:
					return errors.Errorf("not supported marker %v", tbc.marker)
				}
			}
			level.Info(logger).Log("msg", "marking done", "marker", tbc.marker, "IDs", strings.Join(tbc.blockIDs, ","))
			return nil
		}, func(err error) {
			cancel()
		})
		return nil
	})
}

func registerBucketRewrite(app extkingpin.AppClause, objStoreConfig *extflag.PathOrContent) {
	cmd := app.Command(component.Rewrite.String(), "Rewrite chosen blocks in the bucket, while deleting or modifying series "+
		"Resulted block has modified stats in meta.json. Additionally compaction.sources are altered to not confuse readers of meta.json. "+
		"Instead thanos.rewrite section is added with useful info like old sources and deletion requests. "+
		"NOTE: It's recommended to turn off compactor while doing this operation. If the compactor is running and touching exactly same block that "+
		"is being rewritten, the resulted rewritten block might only cause overlap (mitigated by marking overlapping block manually for deletion) "+
		"and the data you wanted to rewrite could already part of bigger block.\n\n"+

View on GitHub (pinned to 35b8b99117)