JuliusBrussee/caveman · error

ccr summary storage

Error message

ccr summary storage: %w

What it means

Wraps the storageBytes()/final accounting query in Store.Summary: after aggregating buckets, reading the store's current retained-byte total failed, so the stats report cannot include storage usage and errors out.

Solutions

  1. Check the wrapped error for lock or corruption causes
  2. Retry the summary
  3. Verify the storage-accounting query/table integrity
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at engine/ccr/store_sqlite.go:695 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/1477e64c6a90ae97. Report an issue: GitHub.

Appendix: source

Thrown at engine/ccr/store_sqlite.go:695

		if err := rows.Scan(&ct, &b.Count, &b.TokensBefore, &b.TokensAfter); err != nil {
			return out, fmt.Errorf("ccr summary scan: %w", err)
		}
		b.Ratio = ratio(b.TokensBefore, b.TokensAfter)
		out.ByContentType[ct] = b
		out.Totals.Count += b.Count
		out.Totals.TokensBefore += b.TokensBefore
		out.Totals.TokensAfter += b.TokensAfter
	}
	if err := rows.Err(); err != nil {
		return out, fmt.Errorf("ccr summary rows: %w", err)
	}
	if err := rows.Close(); err != nil {
		return out, fmt.Errorf("ccr summary close: %w", err)
	}
	out.Totals.Ratio = ratio(out.Totals.TokensBefore, out.Totals.TokensAfter)
	used, err := s.storageBytes()
	if err != nil {
		return out, fmt.Errorf("ccr summary storage: %w", err)
	}
	out.StorageBytes = used
	out.MaxStorageBytes = s.maxBytes
	out.StorageFull = used >= s.maxBytes
	return out, nil
}

View on GitHub (pinned to 766dce6b13)