Harden persistent ingest and prepare 0.2.0 release - #2
Merged
Conversation
Remove entity-resolution bypasses, make persistent acknowledgements durable, fix staged deduplication and recovery edge cases, modernize the Rust and dependency baseline, and align tests, benchmarks, CI, and documentation with production persistence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Critical correctness findings addressed
Persistent shards previously routed large batches into independent in-memory partition stores. The request was acknowledged, but the primary PersistentStore used by queries and restart recovery never received those records. The partitioned module also exposed an ultra-fast API that skipped both storage and entity resolution. This PR removes that API and confines the current partition implementation to explicitly non-persistent shards.
The external ingest WAL was previously removed after asynchronous RocksDB writes, leaving a power-loss window where an acknowledged request could disappear from both recovery layers. Persistent ingest now writes and fsyncs a checksummed binary request WAL, resolves and persists the batch, synchronously flushes the RocksDB WAL, then removes and directory-syncs the request WAL before acknowledging.
Corrupt or truncated request WALs now fail shard startup with a data-loss error and are quarantined for operator recovery. Cross-shard merge redirects survive restart, checkpoints sync the WAL, and persistent reset clears record, DSU, tiered-index, and linker state in one RocksDB write batch.
Compatibility
Verification
cargo +1.88.0 check --locked --all-features --libcargo +1.97.0 test --locked --all-featurescargo +1.97.0 clippy --locked --all-targets --all-features -- -D warningscargo +1.97.0 fmt --all -- --checkThe prior ~410K records/sec figure came from the non-durable partition path and is intentionally no longer presented as a production baseline. The earlier 70,539 records/sec audit did not synchronously flush the RocksDB WAL before acknowledgement and has been replaced.
Reconciliation and operator safety