thanos-io/thanos · error

mark for

Error message

mark %v for %v

What it means

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.

Solutions

  1. Check object storage upload permissions
  2. Inspect the wrapped error for network/credential causes
  3. Retry the mark command
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at cmd/thanos/tools_bucket.go:1140 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/3e79ccbeec526164. Report an issue: GitHub.

Appendix: source

Thrown at cmd/thanos/tools_bucket.go:1140

		if !tbc.removeMarker && tbc.details == "" {
			return errors.Errorf("required flag --details not provided")
		}

		ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
		g.Add(func() error {
			for _, id := range ids {
				if tbc.removeMarker {
					err := block.RemoveMark(ctx, logger, insBkt, id, promauto.With(nil).NewCounter(prometheus.CounterOpts{}), tbc.marker)
					if err != nil {
						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()
		})

View on GitHub (pinned to 35b8b99117)