{"record":{"id":"1477e64c6a90ae97","repo":"JuliusBrussee/caveman","slug":"ccr-summary-storage-w","errorCode":null,"errorMessage":"ccr summary storage: %w","messagePattern":"ccr summary storage: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":695,"sourceCode":"\t\tif err := rows.Scan(&ct, &b.Count, &b.TokensBefore, &b.TokensAfter); err != nil {\n\t\t\treturn out, fmt.Errorf(\"ccr summary scan: %w\", err)\n\t\t}\n\t\tb.Ratio = ratio(b.TokensBefore, b.TokensAfter)\n\t\tout.ByContentType[ct] = b\n\t\tout.Totals.Count += b.Count\n\t\tout.Totals.TokensBefore += b.TokensBefore\n\t\tout.Totals.TokensAfter += b.TokensAfter\n\t}\n\tif err := rows.Err(); err != nil {\n\t\treturn out, fmt.Errorf(\"ccr summary rows: %w\", err)\n\t}\n\tif err := rows.Close(); err != nil {\n\t\treturn out, fmt.Errorf(\"ccr summary close: %w\", err)\n\t}\n\tout.Totals.Ratio = ratio(out.Totals.TokensBefore, out.Totals.TokensAfter)\n\tused, err := s.storageBytes()\n\tif err != nil {\n\t\treturn out, fmt.Errorf(\"ccr summary storage: %w\", err)\n\t}\n\tout.StorageBytes = used\n\tout.MaxStorageBytes = s.maxBytes\n\tout.StorageFull = used >= s.maxBytes\n\treturn out, nil\n}\n","sourceCodeStart":677,"sourceCodeEnd":702,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L677-L702","documentation":"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.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:695 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for lock or corruption causes","Retry the summary","Verify the storage-accounting query/table integrity"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}