JuliusBrussee/caveman · error
ccr summary close: %w
Error message
ccr summary close: %w
What it means
Wraps the explicit rows.Close error in Store.Summary. Closing the cursor released resources but reported an error (pending I/O failure); because it may indicate unread rows, the summary fails rather than reporting possibly-incomplete totals.
Source
Thrown at engine/ccr/store_sqlite.go:690
}
defer rows.Close()
for rows.Next() {
var ct string
var b Bucket
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)
Solutions
- Check the wrapped error for the deferred I/O failure
- Retry the summary
- Investigate database health if close errors persist
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at engine/ccr/store_sqlite.go:690 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/a7809f74064c9c05.
Report an issue: GitHub.