thanos-io/thanos · error
sync before first pass of downsampling
Error message
sync before first pass of downsampling
What it means
Wrapper error in runCompact's downsampling first pass (cmd/thanos/compact.go:454) around sy.SyncMetas(ctx). The bucket metadata syncer failed to refresh block metas from the object store before downsampling began, so the process cannot build a reliable filtered block list.
Solutions
- Check the wrapped inner error for the failing object store operation
- Retry thanos compact; SyncMetas is idempotent and retried on the next run
- Verify object store credentials and network path
- Enable request logging/metrics on the bucket client to identify throttling
- Increase request timeouts/retries on the object store client config
Defensive patterns
Strategy: retry
Try / catch
if err := sy.SyncMetas(ctx); err != nil {
if errors.Is(err, context.Canceled) { return err }
return errors.Wrap(err, "sync before first pass of downsampling")
} Prevention
- Configure bucket client retries/backoff for 5xx and 429 responses
- Use valid, long-lived credentials for long compaction cycles
- Alert on object-store error rate metrics during compaction windows
When it happens
Trigger: sy.SyncMetas returning an error: object store list/get failures, network interruption, throttling (429), or malformed meta.json objects during sync.
Common situations: S3/GCS outages or rate limiting during large buckets, expired credentials, proxy/firewall interruptions between Thanos and the store.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- sync before second pass of downsampling
- sync before retention
- unable to sync blocks
- sync block
- raw resolution must be higher than the minimum block size…
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/a83e400425c09bf2.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/compact.go:454
compact.BestEffortCleanAbortedPartialUploads(ctx, logger, sy.Partial(), insBkt, compactMetrics.partialUploadDeleteAttempts, compactMetrics.blocksCleaned, compactMetrics.blockCleanupFailures, ignoreDeletionMarkFilter.DeletionMarkBlocks())
compactMetrics.cleanups.Inc()
return nil
}
compactMainFn := func() error {
if err := compactor.Compact(ctx); err != nil {
return errors.Wrap(err, "compaction")
}
if !conf.disableDownsampling {
// After all compactions are done, work down the downsampling backlog.
// We run two passes of this to ensure that the 1h downsampling is generated
// for 5m downsamplings created in the first run.
level.Info(logger).Log("msg", "start first pass of downsampling")
if err := sy.SyncMetas(ctx); err != nil {
return errors.Wrap(err, "sync before first pass of downsampling")
}
filteredMetas := sy.Metas()
noDownsampleBlocks := noDownsampleMarkerFilter.NoDownsampleMarkedBlocks()
for ul := range noDownsampleBlocks {
delete(filteredMetas, ul)
}
for _, meta := range filteredMetas {
resolutionLabel := meta.Thanos.ResolutionString()
downsampleMetrics.downsamples.WithLabelValues(resolutionLabel)
downsampleMetrics.downsampleFailures.WithLabelValues(resolutionLabel)
}
if err := downsampleBucket(
ctx,
logger,
downsampleMetrics,View on GitHub (pinned to 35b8b99117)