{"record":{"id":"bbfd195327e76acc","repo":"thanos-io/thanos","slug":"block-s-has-no-meta-file","errorCode":null,"errorMessage":"block %s has no meta file","messagePattern":"block (.+?) has no meta file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/block/fetcher.go","lineNumber":599,"sourceCode":"\t}\n\n\tvar partialBlocks map[ulid.ULID]bool\n\tvar err error\n\t// Workers scheduled, distribute blocks.\n\teg.Go(func() error {\n\t\tdefer close(activeBlocksCh)\n\t\tpartialBlocks, err = f.blockIDsLister.GetActiveAndPartialBlockIDs(ctx, activeBlocksCh)\n\t\treturn err\n\t})\n\n\tif err := eg.Wait(); err != nil {\n\t\treturn nil, errors.Wrap(err, \"BaseFetcher: iter bucket\")\n\t}\n\n\tmtx.Lock()\n\tfor blockULID, isPartial := range partialBlocks {\n\t\tif isPartial {\n\t\t\tresp.partial[blockULID] = errors.Errorf(\"block %s has no meta file\", blockULID)\n\t\t\tresp.noMetas++\n\t\t}\n\t}\n\tmtx.Unlock()\n\n\tif len(resp.metaErrs) > 0 {\n\t\treturn resp, nil\n\t}\n\n\t// Only for complete view of blocks update the cache.\n\n\tcached := &sync.Map{}\n\tfor id, m := range resp.metas {\n\t\tcached.Store(id, m)\n\t}\n\n\tmodifiedTimestamps := make(map[ulid.ULID]time.Time, len(resp.modifiedTimestamps))\n\tmaps.Copy(modifiedTimestamps, resp.modifiedTimestamps)","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/block/fetcher.go#L581-L617","documentation":"After listing the bucket, fetchMetadata classifies blocks flagged as partial by the lister and records per-block errors \"block %s has no meta file\", incrementing resp.noMetas. This is a per-block (not fatal) error meaning a block directory exists in the bucket but its meta.json is absent — typically because the block is still being uploaded (partial block).","triggerScenarios":"fetchMetadata encounters a block ULID in partialBlocks (GetActiveAndPartialBlockIDs returned isPartial=true): the block dir exists but meta.json is missing/not yet uploaded.","commonSituations":"Concurrent upload in progress (uploader writes dir and index before meta.json); crashed/interrupted upload leaving an empty block dir; manually deleted meta.json; another process mid-upload during sync.","solutions":["If the block is still being uploaded, wait for the upload to finish and re-sync — partial blocks resolve on their own.","Delete the leftover partial block directory from the bucket if its uploader crashed.","Check the uploader/compactor logs for failed uploads and re-run the upload.","Enable IgnoreBlockList or block list filtering to skip known-partial blocks during sync if desired."],"exampleFix":"// before: leftover partial block in bucket with no meta.json\n// s3://my-bucket/01ARZ3NDEKTSV4RRFFQ69G5FAV/ (only index + chunks, no meta.json)\n// after: remove the partial block\naws s3 rm s3://my-bucket/01ARZ3NDEKTSV4RRFFQ69G5FAV --recursive","handlingStrategy":"fallback","validationCode":"// Before treating as fatal: list blocks and check for meta.json presence\n_, partial, err := lister.GetActiveAndPartialBlockIDs(ctx, ch)\nif err == nil && len(partial) > 0 {\n    // exclude partial blocks or wait for uploads to finish\n}","typeGuard":null,"tryCatchPattern":"metas, err := fetcher.FetchMetadata(ctx, filtered)\nif err != nil {\n    if strings.Contains(err.Error(), \"has no meta file\") {\n        // per-block warning: log the block ULIDs, skip them, retry sync later\n    } else {\n        return err\n    }\n}","preventionTips":["Keep a single uploader per bucket or use ignore-blocks patterns for in-progress blocks.","Clean up partial block dirs left by crashed uploads before running sync.","Watch the Synced{state=no-meta} metric; persistent values indicate stuck partial uploads.","Let block uploaders finish (upload meta.json last, atomically) before syncing."],"tags":["object-storage","partial-block","sync","blocks"],"backgroundTag":"file-not-found","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}