feat(reads): align live queries to Raft horizons (EN-1946) - #1890
Conversation
🛑 Changes requested — automated reviewThe alignment logic is generally consistent, but the new audit projection gate changes error semantics for invalid filters during rebuild or disabled states. |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (75.45%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## feat/en-1946-projection-certificates #1890 +/- ##
========================================================================
+ Coverage 71.16% 77.09% +5.92%
========================================================================
Files 469 478 +9
Lines 50561 51505 +944
========================================================================
+ Hits 35984 39708 +3724
+ Misses 11352 8337 -3015
- Partials 3225 3460 +235
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d0b1c29 to
e04e577
Compare
6f144ba to
b515155
Compare
NumaryBot
left a comment
There was a problem hiding this comment.
NumaryBot posted 1 new inline finding.
Summary: #1890 (comment)
| var auditSnap *pebble.Snapshot | ||
| indexReader := query.AuditIndexReader(rs) | ||
| if query.AuditFilterNeedsIndex(filter) { | ||
| disabled, rebuilding := rs.AuditProjectionState() |
There was a problem hiding this comment.
🟠 [major] Validate audit filters before checking projection state
When the audit projection is disabled or rebuilding, any malformed or unsupported filter is classified by AuditFilterNeedsIndex as needing the index, so this early return reports ErrIndexBuilding instead of the InvalidArgument that CompileAuditFilter would produce. Clients can therefore receive a transient availability error for permanently invalid input; validate the filter before applying the projection-state gate.
Stack 2/7 for EN-1946. Consumes the projection certificates from the preceding PR to align each live read only with the projections it uses, at the fixed main-store snapshot horizon.