WIP#2571
Conversation
751aa73 to
547cbb2
Compare
|
PR title does not match the required pattern. Please ensure you follow the conventional commits spec. Your title should start with Title: Your title should start with Title: Your title should start with Title: Your title should start with Title: Your title should start with Title: Your title should start with Title: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2571 +/- ##
==========================================
+ Coverage 88.72% 88.77% +0.05%
==========================================
Files 182 183 +1
Lines 62014 62493 +479
Branches 62014 62493 +479
==========================================
+ Hits 55021 55481 +460
- Misses 4854 4857 +3
- Partials 2139 2155 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
547cbb2 to
c30a677
Compare
Mirrors DomainMetadataState: Complete(map) when the CRC file had the setTransactions field (authoritative for misses), Partial(map) when it did not (hits are authoritative, misses fall through to log replay). - Replaces Option<HashMap<String, SetTransaction>> on Crc with set_transaction_state: SetTransactionState - TryFrom<CrcRaw>: Some(vec) -> Complete(map), None -> Partial(empty) - TryFrom<&Crc>: Complete -> Some(vec), Partial -> None (dropped) - Crc::apply upserts into whichever variant is present, preserving it - into_crc_for_version_zero produces Complete (full state known) - get_app_id_version: Complete miss returns None (authoritative), Partial miss falls through to log replay
Adds LogSegment::build_crc_delta_from_stale, which reverse-replays plain commit files in (base_version, end_version] and produces a CrcDelta that Crc::apply consumes to advance the base CRC to the snapshot version. Foundation for PR5's Snapshot wiring. Includes prefactor-marked changes to CrcDelta (HashMap-keyed DM/txn, single is_incremental_safe flag, flat Option<i64> ICT) that will be split into a separate pre-factor PR before merge; see PREFACTOR-PR: markers.
Adds the spec-mandated invariant check in try_write_crc_file: in_commit_timestamp_opt must be present iff the protocol's inCommitTimestamp writer feature is enabled. Catch-net for malformed deltas the reverse-replay producer doesn't validate inline. Adds kernel/src/crc/DESIGN_NOTES.md documenting the design pivots made on this branch (per-commit boundaries via _file, ICT first-commit-only capture, HashMap-shaped CrcDelta) so the split into pre-factor + production sub-PRs preserves the rationale. Misc kernel-review fixes: column-index constants in the visitor; clearer naming (is_first_commit, process_batch_start, process_commit_file_end); base_version >= end_version precondition error; additional tests (protocol replacement, base_version filter boundary, parameterized N-files x M-batches accumulator).
0d36eb5 to
7b46957
Compare
🥞 Stacked PR
Use this link to review incremental changes.
What changes are proposed in this pull request?
How was this change tested?