kopia/kopia · error
error determining whether index blob
Error message
error determining whether index blob %v has been downloaded
What it means
Raised by missingIndexBlobs when querying the local cache (cache.hasIndexBlobID) to decide which index blobs still need downloading fails. It is not about the blob being missing (that is handled), but about the cache lookup itself erroring. The wrapped cause indicates the local cache backend (typically the disk cache) could not be inspected.
Solutions
- Check the wrapped cause for the cache-backend error and fix filesystem permissions or I/O issues
- Remove and rebuild the local cache directory so lookups succeed again
- Verify the cache path configuration points to an existing writable location
- Retry the repository open/maintenance after repairing the cache
Defensive patterns
Strategy: fallback
Validate before calling
st, err := os.Stat(cacheDir)
if err != nil || !st.IsDir() {
// recreate cacheDir with 0700 before using the repository
} Try / catch
ids, err := idx.MissingIndexBlobs(ctx, blobs)
if err != nil {
// on cache lookup failure: wipe cache dir and retry once
os.RemoveAll(cacheDir)
ids, err = idx.MissingIndexBlobs(ctx, blobs)
} Prevention
- Ensure the cache directory exists, is a directory, and is writable before opening the repo
- Don't run multiple Kopia processes against the same cache concurrently with conflicting versions
- Recreate the cache after OS crashes or disk errors
- Check file permissions when running as different users (root vs service account)
When it happens
Trigger: c.cache.hasIndexBlobID(ctx, id) returns non-nil while fetchIndexBlobs computes the list of blobs to download via missingIndexBlobs.
Common situations: Local cache directory inaccessible or corrupted; permission errors stat-ing cache files; underlying cache openIndex probing failed (e.g. unreadable cached index file).
Related errors
- error adding content to cache
- error creating list cache directory
- error initializing cache storage
- error listing
- unable to add to committed content cache
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/fb23f2f564248a8b.
Report an issue: GitHub.
Appendix: source
Thrown at repo/content/committed_content_index.go:366
if err := eg.Wait(); err != nil {
return errors.Wrap(err, "error downloading indexes")
}
contentlog.Log(ctx, c.log, "Index blobs downloaded")
return nil
}
// missingIndexBlobs returns a closed channel filled with blob IDs that are not in committedContents cache.
func (c *committedContentIndex) missingIndexBlobs(ctx context.Context, blobs []blob.ID) (<-chan blob.ID, error) {
ch := make(chan blob.ID, len(blobs))
defer close(ch)
for _, id := range blobs {
has, err := c.cache.hasIndexBlobID(ctx, id)
if err != nil {
return nil, errors.Wrapf(err, "error determining whether index blob %v has been downloaded", id)
}
if !has {
ch <- id
}
}
return ch, nil
}
func newCommittedContentIndex(caching *CachingOptions,
v1PerContentOverhead func() int,
formatProvider format.Provider,
permissiveCacheLoading bool,
fetchIndexBlob func(ctx context.Context, blobID blob.ID, output *gather.WriteBuffer) error,
log *contentlog.Logger,
minSweepAge time.Duration,
) *committedContentIndex {View on GitHub (pinned to 82495e54b5)