thanos-io/thanos · error

get parquet metadata file

Error message

get parquet metadata file: %v

What it means

Error wrapping a failed objstore bucket Get of a parquet metadata file, including the object path. Occurs inside readMigratedBlocksFromParquetMetadata when the reader for the object cannot be obtained.

Solutions

  1. Check the wrapped inner error: NotFound means the file vanished — re-run the scan
  2. Verify GetObject permissions on the parquet metadata prefix
  3. Retry on 429/5xx; reduce worker concurrency if throttled
  4. Confirm bucket endpoint/credentials are correct
Defensive patterns

Strategy: retry

Try / catch

ids, err := readMigrated(ctx, path)
if err != nil {
    if bkt.IsObjNotFoundErr(err) { return nil, nil /* file vanished; skip */ }
    return retry.WithBackoff(ctx, func() error { _, err = readMigrated(ctx, path); return err }, 3)
}

Prevention

When it happens

Trigger: f.bkt.Get(ctx, path) returns an error — object does not exist (deleted between listing and Get), permission denied, throttling, network failure, or bad bucket configuration.

Common situations: Converter deleted the metadata file mid-scan; IAM policy missing GetObject on the prefix; bucket throttling (S3 SlowDown) under concurrent workers.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at pkg/block/fetcher.go:1231

				continue
			}
			if _, ok := fullyCoveredDays[day]; !ok {
				canDelete = false
				break
			}
		}
		if canDelete {
			result[b.id] = struct{}{}
		}
	}
	return result
}

func (f *IgnoreParquetConvertedBlocksFilter) readMigratedBlocksFromParquetMetadata(ctx context.Context, path string) (map[ulid.ULID]struct{}, error) {
	migratedBlocks := make(map[ulid.ULID]struct{})
	r, err := f.bkt.Get(ctx, path)
	if err != nil {
		return nil, errors.Wrapf(err, "get parquet metadata file: %v", path)
	}
	defer runutil.CloseWithLogOnErr(f.logger, r, "close bkt get")

	content, err := io.ReadAll(r)
	if err != nil {
		return nil, errors.Wrapf(err, "read parquet metadata file: %v", path)
	}

	var fc easyproto.FieldContext
	for len(content) > 0 {
		content, err = fc.NextField(content)
		if err != nil {
			return nil, errors.Wrapf(err, "read next field from parquet metadata file: %v", path)
		}
		switch fc.FieldNum {
		case 6:
			u, ok := fc.String()
			if !ok {

View on GitHub (pinned to 35b8b99117)