thanos-io/thanos · error

failed to read parquet metadata from

Error message

failed to read parquet metadata from %s: %w

What it means

While scanning parquet bucket metadata paths concurrently, reading one metadata object failed; the error is accumulated into a MultiError (reading continues for other paths). Indicates object store read failure or corrupt parquet metadata.

Solutions

  1. Check object store connectivity for the parquet bucket
  2. Inspect the failed path in the error
  3. Retry the operation
Defensive patterns

Strategy: fallback

Try / catch

if err := ensureParquetMetadataScanned(ctx); err != nil {
    var errs []error
    if errors.As(err, &errs) {
        for _, e := range errs { log.Printf("parquet meta: %v", e) }
    }
    // fall back to treating no blocks as migrated
}

Prevention

When it happens

Trigger: Calling the method that lists parquet-converted block metadata (parquet metadata objects under the bucket) when reading one of those objects fails: objstore Get error, io.ReadAll error, or proto field parse error inside readMigratedBlocksFromParquetMetadata.

Common situations: Missing permissions on the parquet metadata prefix; object deleted between listing and Get; truncated/corrupt parquet metadata files written by a crashed converter; bucket throttling under concurrency.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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

Appendix: source

Thrown at pkg/block/fetcher.go:1106

	if f.bkt == nil {
		return nil
	}

	var (
		eg                errgroup.Group
		ch                = make(chan string, f.concurrency)
		mtx               sync.Mutex
		allMigratedBlocks = make(map[ulid.ULID]struct{})
		merrs             errutil.MultiError
	)

	for range f.concurrency {
		eg.Go(func() error {
			for path := range ch {
				migratedBlocks, err := f.readMigratedBlocksFromParquetMetadata(ctx, path)
				if err != nil {
					mtx.Lock()
					merrs.Add(fmt.Errorf("failed to read parquet metadata from %s: %w", path, err))
					mtx.Unlock()

					continue
				}

				mtx.Lock()
				for id := range migratedBlocks {
					allMigratedBlocks[id] = struct{}{}
				}
				mtx.Unlock()
			}
			return nil
		})
	}

	eg.Go(func() error {
		defer close(ch)

View on GitHub (pinned to 35b8b99117)