kopia/kopia · error
error getting index set
Error message
error getting index set
What it means
ManagerV1.ListActiveIndexBlobs calls epochMgr.GetCompleteIndexSet for the latest epoch to enumerate active index blobs; this error wraps any failure from that epoch-manager query. Without the complete index set, callers (ListIndexBlobInfos) cannot enumerate index metadata, which typically blocks operations like full maintenance and content loading.
Solutions
- Inspect the wrapped cause for the underlying storage error (auth, network, missing marker) and fix it.
- Retry the listing; epoch marker reads may have hit a transient storage fault.
- Verify the upgrade to index blob manager V1 completed and epoch markers are intact (check `kopia repository status`).
- Increase context timeout if large index sets exceed the deadline.
Example fix
// before
active, deletionWatermark, err := m.epochMgr.GetCompleteIndexSet(ctx, epoch.LatestEpoch)
if err != nil {
return nil, time.Time{}, errors.Wrap(err, "error getting index set")
}
// after: retry transient failures
var active []blob.Metadata
var deletionWatermark time.Time
err := retry.WithExponentialBackoff(ctx, "get index set", func() error {
var werr error
active, deletionWatermark, werr = m.epochMgr.GetCompleteIndexSet(ctx, epoch.LatestEpoch)
return werr
})
if err != nil {
return nil, time.Time{}, errors.Wrap(err, "error getting index set")
} Defensive patterns
Strategy: retry
Validate before calling
if err := st.ConnectionInfo().CheckConnection(); err != nil {
return fmt.Errorf("storage not reachable before listing indexes: %w", err)
} Try / catch
infos, err := mgr.ListIndexBlobInfos(ctx)
if err != nil && strings.Contains(err.Error(), "error getting index set") {
// retry after brief delay; epoch marker reads can fail transiently
time.Sleep(retryDelay)
infos, err = mgr.ListIndexBlobInfos(ctx)
} Prevention
- Ensure the V0->V1 upgrade completed before using V1 maintenance APIs.
- Verify storage credentials/permissions before maintenance windows.
- Use generous timeouts for repositories with many index blobs.
When it happens
Trigger: Listing index blobs on a V1 manager when the epoch manager cannot read/assemble the index set for epoch.LatestEpoch — storage read errors on epoch markers, missing/unreadable epoch manager state, or context cancellation.
Common situations: Storage outage or permission change while running `kopia content list` or maintenance; repository partially migrated to V1 with inconsistent epoch markers; very large index sets timing out on slow storage.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- CompactEpoch
- error advancing epoch marker
- error cleaning up epoch manager
- error getting log sessions
- error iterating packs
AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07).
Data as JSON: /api/errors/3aefd4bd477ddd7d.
Report an issue: GitHub.
Appendix: source
Thrown at repo/content/indexblob/index_blob_manager_v1.go:45
formattingOptions IndexFormattingOptions
log *contentlog.Logger
epochMgr *epoch.Manager
}
// ListIndexBlobInfos lists active blob info structs.
func (m *ManagerV1) ListIndexBlobInfos(ctx context.Context) ([]Metadata, error) {
blobs, _, err := m.ListActiveIndexBlobs(ctx)
return blobs, err
}
// ListActiveIndexBlobs lists the metadata for active index blobs and returns the cut-off time
// before which all deleted index entries should be treated as non-existent.
func (m *ManagerV1) ListActiveIndexBlobs(ctx context.Context) ([]Metadata, time.Time, error) {
active, deletionWatermark, err := m.epochMgr.GetCompleteIndexSet(ctx, epoch.LatestEpoch)
if err != nil {
return nil, time.Time{}, errors.Wrap(err, "error getting index set")
}
var result []Metadata
for _, bm := range active {
result = append(result, Metadata{Metadata: bm})
}
contentlog.Log2(ctx, m.log, "total active indexes", logparam.Int("len", len(active)), logparam.Time("deletionWatermark", deletionWatermark))
return result, deletionWatermark, nil
}
// Invalidate clears any read caches.
func (m *ManagerV1) Invalidate() {
m.epochMgr.Invalidate()
}
View on GitHub (pinned to 82495e54b5)