docs: auto-update for PR #2972 — test(storage): un-ignore nested CRDT merge suite#2984
Closed
meroreviewer[bot] wants to merge 2 commits into
Closed
docs: auto-update for PR #2972 — test(storage): un-ignore nested CRDT merge suite#2984meroreviewer[bot] wants to merge 2 commits into
meroreviewer[bot] wants to merge 2 commits into
Conversation
Contributor
Author
There was a problem hiding this comment.
🤖 AI Code Reviewer
Reviewed by 2 agents | Quality score: 90% | Review time: 37.2s
✅ No Issues Found
All agents reviewed the code and found no issues. LGTM! 🎉
🤖 Generated by AI Code Reviewer | Review ID: review-c0125f15
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.
Automatic Documentation Update
Opened automatically after PR #2972 merged.
Each block shows the documentation change as a diff (added lines in green, removed in red); expand "Why this changed" for the source rationale.
Documentation changes
architecture/storage-schema.html— Enable nested_crdt_merge test module; Replace Root wrappers with direct UnorderedMap usage; Replace String leaf values with LwwRegister; Replace clone-to-fork pattern with independent node construction; Use distinct executor IDs per replica in counter merge tests; Replace sleep-based LWW timestamp ordering with explicit deterministic timestamps; Add ts() helper for constructing deterministic HybridTimestamps; Rename test_map_merge_with_different_keys to test_map_union_merge_with_disjoint_keys; Add #[serial] attribute to all nested CRDT merge tests; Remove all #[ignore] attributes from nested CRDT merge testsWhy this changed (source: PR #2972)
The
nested_crdt_mergemodule was commented out inlib.rswith a TODO about Clone. It is now unconditionally compiled and included in the test suite.All five tests previously wrapped collections in
Root<T>and calledMergeable::mergeon the root.Root<T>uses a special app-registered callback, notMergeable, so the tests never actually tested merge logic. Tests now callMergeable::mergedirectly onUnorderedMapinstances.Nested maps used
Stringas the leaf CRDT value.Stringintentionally does not implementMergeable. All leaf values are nowLwwRegister<String>, which does implementMergeablevia Last-Write-Wins semantics.Tests previously attempted to clone one collection to simulate a second replica. Storage-backed collections cannot be cloned. Each test now constructs two completely independent collection instances from scratch, each populated with the same initial data plus node-specific divergent writes.
In
test_map_of_counters_merge, node 1 uses executor ID[100;32]and node 2 uses[200;32]before their respective increment calls. GCounter tracks increments per executor key; using the same ID on both nodes would cause max-semantics to yield 3 instead of the correct sum of 6 after merge.test_map_of_lww_registers_mergepreviously usedstd::thread::sleepto create real-time gaps between writes, making timestamp ordering depend on wall-clock behavior. All LwwRegister insertions now useLwwRegister::new_with_metadatawith explicitHybridTimestampvalues constructed via ats(time, node)helper function.A module-private
ts(time: u64, node: NonZeroU128) -> HybridTimestampfunction was added. It constructs aHybridTimestampfrom an explicit logical time and node ID.NonZeroU128is used for the node parameter to make zero-value mistakes visible at the call site.The test was renamed to accurately describe its behavior: it validates that merging two maps with completely disjoint keys produces a union (both keys present in result), not that it tests counter merge semantics.
All five tests are now annotated with
#[serial]from theserial_testcrate, ensuring they run sequentially rather than in parallel.Five tests that were marked
#[ignore]are now active and included in the default test run.architecture/migrations.html— Enable nested_crdt_merge test module; Replace Root wrappers with direct UnorderedMap usage; Replace String leaf values with LwwRegister; Replace clone-to-fork pattern with independent node construction; Use distinct executor IDs per replica in counter merge tests; Replace sleep-based LWW timestamp ordering with explicit deterministic timestamps; Add ts() helper for constructing deterministic HybridTimestamps; Rename test_map_merge_with_different_keys to test_map_union_merge_with_disjoint_keys; Add #[serial] attribute to all nested CRDT merge tests; Remove all #[ignore] attributes from nested CRDT merge testsWhy this changed (source: PR #2972)
The
nested_crdt_mergemodule was commented out inlib.rswith a TODO about Clone. It is now unconditionally compiled and included in the test suite.All five tests previously wrapped collections in
Root<T>and calledMergeable::mergeon the root.Root<T>uses a special app-registered callback, notMergeable, so the tests never actually tested merge logic. Tests now callMergeable::mergedirectly onUnorderedMapinstances.Nested maps used
Stringas the leaf CRDT value.Stringintentionally does not implementMergeable. All leaf values are nowLwwRegister<String>, which does implementMergeablevia Last-Write-Wins semantics.Tests previously attempted to clone one collection to simulate a second replica. Storage-backed collections cannot be cloned. Each test now constructs two completely independent collection instances from scratch, each populated with the same initial data plus node-specific divergent writes.
In
test_map_of_counters_merge, node 1 uses executor ID[100;32]and node 2 uses[200;32]before their respective increment calls. GCounter tracks increments per executor key; using the same ID on both nodes would cause max-semantics to yield 3 instead of the correct sum of 6 after merge.test_map_of_lww_registers_mergepreviously usedstd::thread::sleepto create real-time gaps between writes, making timestamp ordering depend on wall-clock behavior. All LwwRegister insertions now useLwwRegister::new_with_metadatawith explicitHybridTimestampvalues constructed via ats(time, node)helper function.A module-private
ts(time: u64, node: NonZeroU128) -> HybridTimestampfunction was added. It constructs aHybridTimestampfrom an explicit logical time and node ID.NonZeroU128is used for the node parameter to make zero-value mistakes visible at the call site.The test was renamed to accurately describe its behavior: it validates that merging two maps with completely disjoint keys produces a union (both keys present in result), not that it tests counter merge semantics.
All five tests are now annotated with
#[serial]from theserial_testcrate, ensuring they run sequentially rather than in parallel.Five tests that were marked
#[ignore]are now active and included in the default test run.Generated by
ai-reviewer update-docs. Nothing was auto-merged.