-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve Detached Client's Lamport in Version Vector #1090
Conversation
… min version vector
Since we decided to remain detached client's lamport in every version vector, we don't need to compute min lamport to run GC because min version vector contains every client's lamport
WalkthroughThe pull request includes significant revisions to the garbage collection documentation and related code changes across multiple files. It clarifies the implementation of garbage collection in CRDT environments, particularly emphasizing the transition to version vectors from Lamport timestamps. The changes streamline the handling of version vectors, especially regarding detached clients, by removing unnecessary filtering logic. Additionally, new test cases have been added to ensure the robustness of garbage collection under various scenarios, including client detachment. Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (5)
test/integration/gc_test.go (2)
445-447
: Address the TODO comment on removing detached clients' lamports from the version vectorThere's a TODO comment indicating the need to consider removing detached clients' lamport values from the version vector. Implementing this change could enhance version vector accuracy and improve garbage collection behavior.
Would you like assistance in addressing this TODO? I can help implement the necessary changes or open a new GitHub issue to track this task.
1194-1196
: Address the TODO comment on handling detached clients in the version vectorA TODO comment suggests considering the removal of detached clients' lamport values from the version vector. Resolving this could improve version vector management and prevent potential issues with garbage collection.
Would you like assistance in resolving this TODO? I can help implement the solution or create a GitHub issue to track it.
design/garbage-collection.md (1)
53-53
: Correct the syntax in the GC algorithm code snippetThe code snippet includes an extra closing brace
}
which may be unnecessary or misplaced. Please verify and correct the snippet for syntactical accuracy.Apply this diff to fix the syntax:
if (removedAt.lamport <= minVersionVector[removedAt.actor]) { runGC() -}
server/backend/database/memory/database.go (1)
1350-1352
: Address the TODO comment on removing detached clients' lamports from the min version vectorThere's a TODO indicating the need to consider removing detached clients' lamport values from the minimum version vector. Implementing this change could improve the accuracy of version vector calculations and garbage collection.
Would you like assistance in addressing this TODO? I can help implement the necessary changes or create a GitHub issue to track this task.
server/backend/database/mongo/client.go (1)
1238-1238
: Track this TODO as a follow-up task.This TODO indicates a temporary solution for handling detached clients' lamports. To ensure this doesn't become a permanent workaround, we should track this for future improvement.
Would you like me to help create a GitHub issue to track this TODO for implementing a permanent solution?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (7)
design/garbage-collection.md
(1 hunks)pkg/document/document.go
(1 hunks)pkg/document/internal_document.go
(0 hunks)pkg/document/time/version_vector.go
(1 hunks)server/backend/database/memory/database.go
(2 hunks)server/backend/database/mongo/client.go
(3 hunks)test/integration/gc_test.go
(2 hunks)
💤 Files with no reviewable changes (1)
- pkg/document/internal_document.go
🔇 Additional comments (5)
pkg/document/time/version_vector.go (1)
120-120
: Verify the logic in EqualToOrAfter
method after removing MinLamport
After removing the MinLamport
method, please ensure that the EqualToOrAfter
method correctly handles cases when the actor ID is not present in the version vector. Confirm that the logic maintains accurate causal relationship determination.
pkg/document/document.go (1)
224-224
: LGTM: Simplified status update logic
The status is now updated based on pack.IsRemoved
without additional conditions, which simplifies the code and enhances readability.
server/backend/database/memory/database.go (1)
Line range hint 1360-1384
: Verify the impact of not filtering detached clients in min version vector calculation
The code now computes the minimum version vector without filtering out detached clients. Please verify that this change does not negatively affect version vector accuracy or garbage collection behavior, especially in scenarios involving client detachment.
server/backend/database/mongo/client.go (2)
Line range hint 1254-1274
: LGTM: Changes align with fixing the GC error.
The modifications to minimum version vector computation now correctly retain lamports of detached clients by:
- Computing the minimum version vector across all clients without filtering
- Including the current client's version vector in the computation
This change directly addresses the GC error from issue #1089 where detached clients' lamports were being filtered out.
Line range hint 1277-1282
: LGTM: Clean separation of version vector computation and persistence.
The code properly separates the minimum version vector computation from the persistence logic, with appropriate error handling and clear documentation.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1090 +/- ##
==========================================
+ Coverage 46.79% 46.99% +0.19%
==========================================
Files 84 84
Lines 12219 12162 -57
==========================================
- Hits 5718 5715 -3
+ Misses 5928 5875 -53
+ Partials 573 572 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (4)
server/backend/database/memory/database.go (2)
1350-1351
: Consider documenting the planned approach for handling detached clients' lamports.The TODO comment indicates this is a temporary solution. Consider documenting the planned approach for properly handling detached clients' lamports in the future, possibly in a design document.
Line range hint
1364-1382
: Add comments explaining the version vector computation strategy.The version vector computation has been simplified to include all clients' lamports. Consider adding comments to explain:
- Why we're including all version vectors without filtering
- The implications for garbage collection
- How this relates to the temporary retention of detached clients' lamports
test/integration/gc_test.go (2)
1195-1198
: Enhance test documentation regarding temporary behavior.The test verifies the current behavior of retaining detached clients' lamports. Consider adding comments to:
- Explicitly state this is testing the temporary behavior
- Note that this test may need updates when the permanent solution is implemented
1200-1304
: Structure the test case with clear phase markers.The test comprehensively covers GC behavior with detached clients but could be more readable. Consider:
- Adding comments to clearly separate test phases (setup, pre-detach operations, detachment, post-detach operations)
- Adding explanatory comments for the expected state after each phase
- Grouping assertions by their purpose
Example structure:
t.Run("detach gc test", func(t *testing.T) { + // Phase 1: Setup clients := activeClients(t, 3) c1, c2, c3 := clients[0], clients[1], clients[2] defer deactivateAndCloseClients(t, clients) + // Phase 2: Initial state and operations ctx := context.Background() // ... existing code ... + // Phase 3: Detachment and post-detach operations assert.NoError(t, c3.Detach(ctx, d3)) // ... existing code ... + // Phase 4: Verify GC behavior assert.Equal(t, 2, d1.GarbageLen()) // ... existing code ... })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
server/backend/database/memory/database.go
(2 hunks)server/backend/database/mongo/client.go
(3 hunks)test/integration/gc_test.go
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- server/backend/database/mongo/client.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go Benchmark
Benchmark suite | Current: 2b9a77b | Previous: 3bfdd7e | Ratio |
---|---|---|---|
BenchmarkDocument/constructor_test |
1499 ns/op 1337 B/op 24 allocs/op |
1487 ns/op 1337 B/op 24 allocs/op |
1.01 |
BenchmarkDocument/constructor_test - ns/op |
1499 ns/op |
1487 ns/op |
1.01 |
BenchmarkDocument/constructor_test - B/op |
1337 B/op |
1337 B/op |
1 |
BenchmarkDocument/constructor_test - allocs/op |
24 allocs/op |
24 allocs/op |
1 |
BenchmarkDocument/status_test |
1117 ns/op 1305 B/op 22 allocs/op |
958.9 ns/op 1305 B/op 22 allocs/op |
1.16 |
BenchmarkDocument/status_test - ns/op |
1117 ns/op |
958.9 ns/op |
1.16 |
BenchmarkDocument/status_test - B/op |
1305 B/op |
1305 B/op |
1 |
BenchmarkDocument/status_test - allocs/op |
22 allocs/op |
22 allocs/op |
1 |
BenchmarkDocument/equals_test |
7873 ns/op 7529 B/op 134 allocs/op |
7846 ns/op 7529 B/op 134 allocs/op |
1.00 |
BenchmarkDocument/equals_test - ns/op |
7873 ns/op |
7846 ns/op |
1.00 |
BenchmarkDocument/equals_test - B/op |
7529 B/op |
7529 B/op |
1 |
BenchmarkDocument/equals_test - allocs/op |
134 allocs/op |
134 allocs/op |
1 |
BenchmarkDocument/nested_update_test |
17573 ns/op 12395 B/op 264 allocs/op |
17057 ns/op 12395 B/op 264 allocs/op |
1.03 |
BenchmarkDocument/nested_update_test - ns/op |
17573 ns/op |
17057 ns/op |
1.03 |
BenchmarkDocument/nested_update_test - B/op |
12395 B/op |
12395 B/op |
1 |
BenchmarkDocument/nested_update_test - allocs/op |
264 allocs/op |
264 allocs/op |
1 |
BenchmarkDocument/delete_test |
23763 ns/op 15923 B/op 347 allocs/op |
23129 ns/op 15923 B/op 347 allocs/op |
1.03 |
BenchmarkDocument/delete_test - ns/op |
23763 ns/op |
23129 ns/op |
1.03 |
BenchmarkDocument/delete_test - B/op |
15923 B/op |
15923 B/op |
1 |
BenchmarkDocument/delete_test - allocs/op |
347 allocs/op |
347 allocs/op |
1 |
BenchmarkDocument/object_test |
8862 ns/op 7073 B/op 122 allocs/op |
8758 ns/op 7073 B/op 122 allocs/op |
1.01 |
BenchmarkDocument/object_test - ns/op |
8862 ns/op |
8758 ns/op |
1.01 |
BenchmarkDocument/object_test - B/op |
7073 B/op |
7073 B/op |
1 |
BenchmarkDocument/object_test - allocs/op |
122 allocs/op |
122 allocs/op |
1 |
BenchmarkDocument/array_test |
30398 ns/op 12203 B/op 278 allocs/op |
35107 ns/op 12203 B/op 278 allocs/op |
0.87 |
BenchmarkDocument/array_test - ns/op |
30398 ns/op |
35107 ns/op |
0.87 |
BenchmarkDocument/array_test - B/op |
12203 B/op |
12203 B/op |
1 |
BenchmarkDocument/array_test - allocs/op |
278 allocs/op |
278 allocs/op |
1 |
BenchmarkDocument/text_test |
32582 ns/op 15326 B/op 492 allocs/op |
31948 ns/op 15323 B/op 492 allocs/op |
1.02 |
BenchmarkDocument/text_test - ns/op |
32582 ns/op |
31948 ns/op |
1.02 |
BenchmarkDocument/text_test - B/op |
15326 B/op |
15323 B/op |
1.00 |
BenchmarkDocument/text_test - allocs/op |
492 allocs/op |
492 allocs/op |
1 |
BenchmarkDocument/text_composition_test |
31316 ns/op 18716 B/op 504 allocs/op |
30859 ns/op 18718 B/op 504 allocs/op |
1.01 |
BenchmarkDocument/text_composition_test - ns/op |
31316 ns/op |
30859 ns/op |
1.01 |
BenchmarkDocument/text_composition_test - B/op |
18716 B/op |
18718 B/op |
1.00 |
BenchmarkDocument/text_composition_test - allocs/op |
504 allocs/op |
504 allocs/op |
1 |
BenchmarkDocument/rich_text_test |
85634 ns/op 40180 B/op 1183 allocs/op |
85646 ns/op 40181 B/op 1183 allocs/op |
1.00 |
BenchmarkDocument/rich_text_test - ns/op |
85634 ns/op |
85646 ns/op |
1.00 |
BenchmarkDocument/rich_text_test - B/op |
40180 B/op |
40181 B/op |
1.00 |
BenchmarkDocument/rich_text_test - allocs/op |
1183 allocs/op |
1183 allocs/op |
1 |
BenchmarkDocument/counter_test |
19413 ns/op 11875 B/op 258 allocs/op |
18515 ns/op 11874 B/op 258 allocs/op |
1.05 |
BenchmarkDocument/counter_test - ns/op |
19413 ns/op |
18515 ns/op |
1.05 |
BenchmarkDocument/counter_test - B/op |
11875 B/op |
11874 B/op |
1.00 |
BenchmarkDocument/counter_test - allocs/op |
258 allocs/op |
258 allocs/op |
1 |
BenchmarkDocument/text_edit_gc_100 |
1348930 ns/op 872525 B/op 17281 allocs/op |
1311618 ns/op 872520 B/op 17282 allocs/op |
1.03 |
BenchmarkDocument/text_edit_gc_100 - ns/op |
1348930 ns/op |
1311618 ns/op |
1.03 |
BenchmarkDocument/text_edit_gc_100 - B/op |
872525 B/op |
872520 B/op |
1.00 |
BenchmarkDocument/text_edit_gc_100 - allocs/op |
17281 allocs/op |
17282 allocs/op |
1.00 |
BenchmarkDocument/text_edit_gc_1000 |
51248980 ns/op 50547709 B/op 186736 allocs/op |
49965170 ns/op 50546176 B/op 186736 allocs/op |
1.03 |
BenchmarkDocument/text_edit_gc_1000 - ns/op |
51248980 ns/op |
49965170 ns/op |
1.03 |
BenchmarkDocument/text_edit_gc_1000 - B/op |
50547709 B/op |
50546176 B/op |
1.00 |
BenchmarkDocument/text_edit_gc_1000 - allocs/op |
186736 allocs/op |
186736 allocs/op |
1 |
BenchmarkDocument/text_split_gc_100 |
1956653 ns/op 1589091 B/op 15951 allocs/op |
1936385 ns/op 1589088 B/op 15952 allocs/op |
1.01 |
BenchmarkDocument/text_split_gc_100 - ns/op |
1956653 ns/op |
1936385 ns/op |
1.01 |
BenchmarkDocument/text_split_gc_100 - B/op |
1589091 B/op |
1589088 B/op |
1.00 |
BenchmarkDocument/text_split_gc_100 - allocs/op |
15951 allocs/op |
15952 allocs/op |
1.00 |
BenchmarkDocument/text_split_gc_1000 |
117711673 ns/op 141482022 B/op 186148 allocs/op |
115279965 ns/op 141482758 B/op 186143 allocs/op |
1.02 |
BenchmarkDocument/text_split_gc_1000 - ns/op |
117711673 ns/op |
115279965 ns/op |
1.02 |
BenchmarkDocument/text_split_gc_1000 - B/op |
141482022 B/op |
141482758 B/op |
1.00 |
BenchmarkDocument/text_split_gc_1000 - allocs/op |
186148 allocs/op |
186143 allocs/op |
1.00 |
BenchmarkDocument/text_delete_all_10000 |
17231281 ns/op 10214432 B/op 55689 allocs/op |
16402203 ns/op 10213283 B/op 55684 allocs/op |
1.05 |
BenchmarkDocument/text_delete_all_10000 - ns/op |
17231281 ns/op |
16402203 ns/op |
1.05 |
BenchmarkDocument/text_delete_all_10000 - B/op |
10214432 B/op |
10213283 B/op |
1.00 |
BenchmarkDocument/text_delete_all_10000 - allocs/op |
55689 allocs/op |
55684 allocs/op |
1.00 |
BenchmarkDocument/text_delete_all_100000 |
312740313 ns/op 142991492 B/op 561755 allocs/op |
280308307 ns/op 142962264 B/op 561666 allocs/op |
1.12 |
BenchmarkDocument/text_delete_all_100000 - ns/op |
312740313 ns/op |
280308307 ns/op |
1.12 |
BenchmarkDocument/text_delete_all_100000 - B/op |
142991492 B/op |
142962264 B/op |
1.00 |
BenchmarkDocument/text_delete_all_100000 - allocs/op |
561755 allocs/op |
561666 allocs/op |
1.00 |
BenchmarkDocument/text_100 |
224872 ns/op 120489 B/op 5182 allocs/op |
242281 ns/op 120491 B/op 5182 allocs/op |
0.93 |
BenchmarkDocument/text_100 - ns/op |
224872 ns/op |
242281 ns/op |
0.93 |
BenchmarkDocument/text_100 - B/op |
120489 B/op |
120491 B/op |
1.00 |
BenchmarkDocument/text_100 - allocs/op |
5182 allocs/op |
5182 allocs/op |
1 |
BenchmarkDocument/text_1000 |
2430773 ns/op 1171278 B/op 51086 allocs/op |
2515892 ns/op 1171283 B/op 51086 allocs/op |
0.97 |
BenchmarkDocument/text_1000 - ns/op |
2430773 ns/op |
2515892 ns/op |
0.97 |
BenchmarkDocument/text_1000 - B/op |
1171278 B/op |
1171283 B/op |
1.00 |
BenchmarkDocument/text_1000 - allocs/op |
51086 allocs/op |
51086 allocs/op |
1 |
BenchmarkDocument/array_1000 |
1228436 ns/op 1091716 B/op 11834 allocs/op |
1286233 ns/op 1091631 B/op 11833 allocs/op |
0.96 |
BenchmarkDocument/array_1000 - ns/op |
1228436 ns/op |
1286233 ns/op |
0.96 |
BenchmarkDocument/array_1000 - B/op |
1091716 B/op |
1091631 B/op |
1.00 |
BenchmarkDocument/array_1000 - allocs/op |
11834 allocs/op |
11833 allocs/op |
1.00 |
BenchmarkDocument/array_10000 |
13557513 ns/op 9799805 B/op 120296 allocs/op |
13191258 ns/op 9798689 B/op 120292 allocs/op |
1.03 |
BenchmarkDocument/array_10000 - ns/op |
13557513 ns/op |
13191258 ns/op |
1.03 |
BenchmarkDocument/array_10000 - B/op |
9799805 B/op |
9798689 B/op |
1.00 |
BenchmarkDocument/array_10000 - allocs/op |
120296 allocs/op |
120292 allocs/op |
1.00 |
BenchmarkDocument/array_gc_100 |
150719 ns/op 133293 B/op 1267 allocs/op |
156741 ns/op 133280 B/op 1266 allocs/op |
0.96 |
BenchmarkDocument/array_gc_100 - ns/op |
150719 ns/op |
156741 ns/op |
0.96 |
BenchmarkDocument/array_gc_100 - B/op |
133293 B/op |
133280 B/op |
1.00 |
BenchmarkDocument/array_gc_100 - allocs/op |
1267 allocs/op |
1266 allocs/op |
1.00 |
BenchmarkDocument/array_gc_1000 |
1415846 ns/op 1159705 B/op 12882 allocs/op |
1452698 ns/op 1159725 B/op 12883 allocs/op |
0.97 |
BenchmarkDocument/array_gc_1000 - ns/op |
1415846 ns/op |
1452698 ns/op |
0.97 |
BenchmarkDocument/array_gc_1000 - B/op |
1159705 B/op |
1159725 B/op |
1.00 |
BenchmarkDocument/array_gc_1000 - allocs/op |
12882 allocs/op |
12883 allocs/op |
1.00 |
BenchmarkDocument/counter_1000 |
199451 ns/op 193335 B/op 5773 allocs/op |
211445 ns/op 193337 B/op 5773 allocs/op |
0.94 |
BenchmarkDocument/counter_1000 - ns/op |
199451 ns/op |
211445 ns/op |
0.94 |
BenchmarkDocument/counter_1000 - B/op |
193335 B/op |
193337 B/op |
1.00 |
BenchmarkDocument/counter_1000 - allocs/op |
5773 allocs/op |
5773 allocs/op |
1 |
BenchmarkDocument/counter_10000 |
2173845 ns/op 2088252 B/op 59780 allocs/op |
2222323 ns/op 2088251 B/op 59780 allocs/op |
0.98 |
BenchmarkDocument/counter_10000 - ns/op |
2173845 ns/op |
2222323 ns/op |
0.98 |
BenchmarkDocument/counter_10000 - B/op |
2088252 B/op |
2088251 B/op |
1.00 |
BenchmarkDocument/counter_10000 - allocs/op |
59780 allocs/op |
59780 allocs/op |
1 |
BenchmarkDocument/object_1000 |
1411370 ns/op 1428277 B/op 9851 allocs/op |
1458733 ns/op 1428429 B/op 9851 allocs/op |
0.97 |
BenchmarkDocument/object_1000 - ns/op |
1411370 ns/op |
1458733 ns/op |
0.97 |
BenchmarkDocument/object_1000 - B/op |
1428277 B/op |
1428429 B/op |
1.00 |
BenchmarkDocument/object_1000 - allocs/op |
9851 allocs/op |
9851 allocs/op |
1 |
BenchmarkDocument/object_10000 |
15943108 ns/op 12168176 B/op 100570 allocs/op |
15480058 ns/op 12168131 B/op 100568 allocs/op |
1.03 |
BenchmarkDocument/object_10000 - ns/op |
15943108 ns/op |
15480058 ns/op |
1.03 |
BenchmarkDocument/object_10000 - B/op |
12168176 B/op |
12168131 B/op |
1.00 |
BenchmarkDocument/object_10000 - allocs/op |
100570 allocs/op |
100568 allocs/op |
1.00 |
BenchmarkDocument/tree_100 |
1064451 ns/op 943958 B/op 6103 allocs/op |
1076173 ns/op 943958 B/op 6103 allocs/op |
0.99 |
BenchmarkDocument/tree_100 - ns/op |
1064451 ns/op |
1076173 ns/op |
0.99 |
BenchmarkDocument/tree_100 - B/op |
943958 B/op |
943958 B/op |
1 |
BenchmarkDocument/tree_100 - allocs/op |
6103 allocs/op |
6103 allocs/op |
1 |
BenchmarkDocument/tree_1000 |
77452235 ns/op 86460630 B/op 60116 allocs/op |
79018430 ns/op 86460670 B/op 60116 allocs/op |
0.98 |
BenchmarkDocument/tree_1000 - ns/op |
77452235 ns/op |
79018430 ns/op |
0.98 |
BenchmarkDocument/tree_1000 - B/op |
86460630 B/op |
86460670 B/op |
1.00 |
BenchmarkDocument/tree_1000 - allocs/op |
60116 allocs/op |
60116 allocs/op |
1 |
BenchmarkDocument/tree_10000 |
9723264202 ns/op 8580674960 B/op 600258 allocs/op |
9699279318 ns/op 8580656624 B/op 600181 allocs/op |
1.00 |
BenchmarkDocument/tree_10000 - ns/op |
9723264202 ns/op |
9699279318 ns/op |
1.00 |
BenchmarkDocument/tree_10000 - B/op |
8580674960 B/op |
8580656624 B/op |
1.00 |
BenchmarkDocument/tree_10000 - allocs/op |
600258 allocs/op |
600181 allocs/op |
1.00 |
BenchmarkDocument/tree_delete_all_1000 |
73833534 ns/op 87532912 B/op 75270 allocs/op |
79993846 ns/op 87508544 B/op 75266 allocs/op |
0.92 |
BenchmarkDocument/tree_delete_all_1000 - ns/op |
73833534 ns/op |
79993846 ns/op |
0.92 |
BenchmarkDocument/tree_delete_all_1000 - B/op |
87532912 B/op |
87508544 B/op |
1.00 |
BenchmarkDocument/tree_delete_all_1000 - allocs/op |
75270 allocs/op |
75266 allocs/op |
1.00 |
BenchmarkDocument/tree_edit_gc_100 |
3755085 ns/op 4147291 B/op 15146 allocs/op |
4042594 ns/op 4147421 B/op 15147 allocs/op |
0.93 |
BenchmarkDocument/tree_edit_gc_100 - ns/op |
3755085 ns/op |
4042594 ns/op |
0.93 |
BenchmarkDocument/tree_edit_gc_100 - B/op |
4147291 B/op |
4147421 B/op |
1.00 |
BenchmarkDocument/tree_edit_gc_100 - allocs/op |
15146 allocs/op |
15147 allocs/op |
1.00 |
BenchmarkDocument/tree_edit_gc_1000 |
299010779 ns/op 383741656 B/op 154848 allocs/op |
322599534 ns/op 383748054 B/op 154868 allocs/op |
0.93 |
BenchmarkDocument/tree_edit_gc_1000 - ns/op |
299010779 ns/op |
322599534 ns/op |
0.93 |
BenchmarkDocument/tree_edit_gc_1000 - B/op |
383741656 B/op |
383748054 B/op |
1.00 |
BenchmarkDocument/tree_edit_gc_1000 - allocs/op |
154848 allocs/op |
154868 allocs/op |
1.00 |
BenchmarkDocument/tree_split_gc_100 |
2514236 ns/op 2412996 B/op 11131 allocs/op |
2670604 ns/op 2413062 B/op 11131 allocs/op |
0.94 |
BenchmarkDocument/tree_split_gc_100 - ns/op |
2514236 ns/op |
2670604 ns/op |
0.94 |
BenchmarkDocument/tree_split_gc_100 - B/op |
2412996 B/op |
2413062 B/op |
1.00 |
BenchmarkDocument/tree_split_gc_100 - allocs/op |
11131 allocs/op |
11131 allocs/op |
1 |
BenchmarkDocument/tree_split_gc_1000 |
183440195 ns/op 222253140 B/op 121998 allocs/op |
197283604 ns/op 222252924 B/op 122003 allocs/op |
0.93 |
BenchmarkDocument/tree_split_gc_1000 - ns/op |
183440195 ns/op |
197283604 ns/op |
0.93 |
BenchmarkDocument/tree_split_gc_1000 - B/op |
222253140 B/op |
222252924 B/op |
1.00 |
BenchmarkDocument/tree_split_gc_1000 - allocs/op |
121998 allocs/op |
122003 allocs/op |
1.00 |
BenchmarkRPC/client_to_server |
421859769 ns/op 19419485 B/op 223215 allocs/op |
422726278 ns/op 19424762 B/op 223665 allocs/op |
1.00 |
BenchmarkRPC/client_to_server - ns/op |
421859769 ns/op |
422726278 ns/op |
1.00 |
BenchmarkRPC/client_to_server - B/op |
19419485 B/op |
19424762 B/op |
1.00 |
BenchmarkRPC/client_to_server - allocs/op |
223215 allocs/op |
223665 allocs/op |
1.00 |
BenchmarkRPC/client_to_client_via_server |
776545452 ns/op 44516720 B/op 473618 allocs/op |
760289428 ns/op 42630016 B/op 475807 allocs/op |
1.02 |
BenchmarkRPC/client_to_client_via_server - ns/op |
776545452 ns/op |
760289428 ns/op |
1.02 |
BenchmarkRPC/client_to_client_via_server - B/op |
44516720 B/op |
42630016 B/op |
1.04 |
BenchmarkRPC/client_to_client_via_server - allocs/op |
473618 allocs/op |
475807 allocs/op |
1.00 |
BenchmarkRPC/attach_large_document |
1290953416 ns/op 1922597280 B/op 12217 allocs/op |
1225671736 ns/op 1909630752 B/op 11893 allocs/op |
1.05 |
BenchmarkRPC/attach_large_document - ns/op |
1290953416 ns/op |
1225671736 ns/op |
1.05 |
BenchmarkRPC/attach_large_document - B/op |
1922597280 B/op |
1909630752 B/op |
1.01 |
BenchmarkRPC/attach_large_document - allocs/op |
12217 allocs/op |
11893 allocs/op |
1.03 |
BenchmarkRPC/adminCli_to_server |
536292790 ns/op 38057864 B/op 289765 allocs/op |
530813520 ns/op 39017900 B/op 289861 allocs/op |
1.01 |
BenchmarkRPC/adminCli_to_server - ns/op |
536292790 ns/op |
530813520 ns/op |
1.01 |
BenchmarkRPC/adminCli_to_server - B/op |
38057864 B/op |
39017900 B/op |
0.98 |
BenchmarkRPC/adminCli_to_server - allocs/op |
289765 allocs/op |
289861 allocs/op |
1.00 |
BenchmarkLocker |
71.41 ns/op 16 B/op 1 allocs/op |
68 ns/op 16 B/op 1 allocs/op |
1.05 |
BenchmarkLocker - ns/op |
71.41 ns/op |
68 ns/op |
1.05 |
BenchmarkLocker - B/op |
16 B/op |
16 B/op |
1 |
BenchmarkLocker - allocs/op |
1 allocs/op |
1 allocs/op |
1 |
BenchmarkLockerParallel |
39.09 ns/op 0 B/op 0 allocs/op |
39.95 ns/op 0 B/op 0 allocs/op |
0.98 |
BenchmarkLockerParallel - ns/op |
39.09 ns/op |
39.95 ns/op |
0.98 |
BenchmarkLockerParallel - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkLockerParallel - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkLockerMoreKeys |
149.2 ns/op 15 B/op 0 allocs/op |
157.1 ns/op 15 B/op 0 allocs/op |
0.95 |
BenchmarkLockerMoreKeys - ns/op |
149.2 ns/op |
157.1 ns/op |
0.95 |
BenchmarkLockerMoreKeys - B/op |
15 B/op |
15 B/op |
1 |
BenchmarkLockerMoreKeys - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkChange/Push_10_Changes |
4471868 ns/op 149733 B/op 1575 allocs/op |
4429755 ns/op 149418 B/op 1576 allocs/op |
1.01 |
BenchmarkChange/Push_10_Changes - ns/op |
4471868 ns/op |
4429755 ns/op |
1.01 |
BenchmarkChange/Push_10_Changes - B/op |
149733 B/op |
149418 B/op |
1.00 |
BenchmarkChange/Push_10_Changes - allocs/op |
1575 allocs/op |
1576 allocs/op |
1.00 |
BenchmarkChange/Push_100_Changes |
16393230 ns/op 784396 B/op 8284 allocs/op |
16027998 ns/op 798797 B/op 8287 allocs/op |
1.02 |
BenchmarkChange/Push_100_Changes - ns/op |
16393230 ns/op |
16027998 ns/op |
1.02 |
BenchmarkChange/Push_100_Changes - B/op |
784396 B/op |
798797 B/op |
0.98 |
BenchmarkChange/Push_100_Changes - allocs/op |
8284 allocs/op |
8287 allocs/op |
1.00 |
BenchmarkChange/Push_1000_Changes |
128576512 ns/op 7026648 B/op 77297 allocs/op |
127365123 ns/op 7149023 B/op 77296 allocs/op |
1.01 |
BenchmarkChange/Push_1000_Changes - ns/op |
128576512 ns/op |
127365123 ns/op |
1.01 |
BenchmarkChange/Push_1000_Changes - B/op |
7026648 B/op |
7149023 B/op |
0.98 |
BenchmarkChange/Push_1000_Changes - allocs/op |
77297 allocs/op |
77296 allocs/op |
1.00 |
BenchmarkChange/Pull_10_Changes |
3685818 ns/op 123552 B/op 1406 allocs/op |
3655770 ns/op 123856 B/op 1406 allocs/op |
1.01 |
BenchmarkChange/Pull_10_Changes - ns/op |
3685818 ns/op |
3655770 ns/op |
1.01 |
BenchmarkChange/Pull_10_Changes - B/op |
123552 B/op |
123856 B/op |
1.00 |
BenchmarkChange/Pull_10_Changes - allocs/op |
1406 allocs/op |
1406 allocs/op |
1 |
BenchmarkChange/Pull_100_Changes |
5293522 ns/op 351420 B/op 5041 allocs/op |
5181920 ns/op 352307 B/op 5042 allocs/op |
1.02 |
BenchmarkChange/Pull_100_Changes - ns/op |
5293522 ns/op |
5181920 ns/op |
1.02 |
BenchmarkChange/Pull_100_Changes - B/op |
351420 B/op |
352307 B/op |
1.00 |
BenchmarkChange/Pull_100_Changes - allocs/op |
5041 allocs/op |
5042 allocs/op |
1.00 |
BenchmarkChange/Pull_1000_Changes |
11077932 ns/op 2228838 B/op 43657 allocs/op |
10478209 ns/op 2229795 B/op 43656 allocs/op |
1.06 |
BenchmarkChange/Pull_1000_Changes - ns/op |
11077932 ns/op |
10478209 ns/op |
1.06 |
BenchmarkChange/Pull_1000_Changes - B/op |
2228838 B/op |
2229795 B/op |
1.00 |
BenchmarkChange/Pull_1000_Changes - allocs/op |
43657 allocs/op |
43656 allocs/op |
1.00 |
BenchmarkSnapshot/Push_3KB_snapshot |
18610659 ns/op 924441 B/op 8289 allocs/op |
18068055 ns/op 914083 B/op 8287 allocs/op |
1.03 |
BenchmarkSnapshot/Push_3KB_snapshot - ns/op |
18610659 ns/op |
18068055 ns/op |
1.03 |
BenchmarkSnapshot/Push_3KB_snapshot - B/op |
924441 B/op |
914083 B/op |
1.01 |
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op |
8289 allocs/op |
8287 allocs/op |
1.00 |
BenchmarkSnapshot/Push_30KB_snapshot |
134326517 ns/op 8152622 B/op 84781 allocs/op |
130399088 ns/op 7857729 B/op 81367 allocs/op |
1.03 |
BenchmarkSnapshot/Push_30KB_snapshot - ns/op |
134326517 ns/op |
130399088 ns/op |
1.03 |
BenchmarkSnapshot/Push_30KB_snapshot - B/op |
8152622 B/op |
7857729 B/op |
1.04 |
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op |
84781 allocs/op |
81367 allocs/op |
1.04 |
BenchmarkSnapshot/Pull_3KB_snapshot |
7693381 ns/op 1140914 B/op 19609 allocs/op |
7382242 ns/op 1142236 B/op 19611 allocs/op |
1.04 |
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op |
7693381 ns/op |
7382242 ns/op |
1.04 |
BenchmarkSnapshot/Pull_3KB_snapshot - B/op |
1140914 B/op |
1142236 B/op |
1.00 |
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op |
19609 allocs/op |
19611 allocs/op |
1.00 |
BenchmarkSnapshot/Pull_30KB_snapshot |
20089809 ns/op 9340234 B/op 189559 allocs/op |
19324951 ns/op 9344420 B/op 189557 allocs/op |
1.04 |
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op |
20089809 ns/op |
19324951 ns/op |
1.04 |
BenchmarkSnapshot/Pull_30KB_snapshot - B/op |
9340234 B/op |
9344420 B/op |
1.00 |
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op |
189559 allocs/op |
189557 allocs/op |
1.00 |
BenchmarkSplayTree/stress_test_100000 |
0.2027 ns/op 0 B/op 0 allocs/op |
0.2006 ns/op 0 B/op 0 allocs/op |
1.01 |
BenchmarkSplayTree/stress_test_100000 - ns/op |
0.2027 ns/op |
0.2006 ns/op |
1.01 |
BenchmarkSplayTree/stress_test_100000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/stress_test_100000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/stress_test_200000 |
0.4102 ns/op 0 B/op 0 allocs/op |
0.3876 ns/op 0 B/op 0 allocs/op |
1.06 |
BenchmarkSplayTree/stress_test_200000 - ns/op |
0.4102 ns/op |
0.3876 ns/op |
1.06 |
BenchmarkSplayTree/stress_test_200000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/stress_test_200000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/stress_test_300000 |
0.6298 ns/op 0 B/op 0 allocs/op |
0.5836 ns/op 0 B/op 0 allocs/op |
1.08 |
BenchmarkSplayTree/stress_test_300000 - ns/op |
0.6298 ns/op |
0.5836 ns/op |
1.08 |
BenchmarkSplayTree/stress_test_300000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/stress_test_300000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/random_access_100000 |
0.0131 ns/op 0 B/op 0 allocs/op |
0.01256 ns/op 0 B/op 0 allocs/op |
1.04 |
BenchmarkSplayTree/random_access_100000 - ns/op |
0.0131 ns/op |
0.01256 ns/op |
1.04 |
BenchmarkSplayTree/random_access_100000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/random_access_100000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/random_access_200000 |
0.03461 ns/op 0 B/op 0 allocs/op |
0.03243 ns/op 0 B/op 0 allocs/op |
1.07 |
BenchmarkSplayTree/random_access_200000 - ns/op |
0.03461 ns/op |
0.03243 ns/op |
1.07 |
BenchmarkSplayTree/random_access_200000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/random_access_200000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/random_access_300000 |
0.04331 ns/op 0 B/op 0 allocs/op |
0.0408 ns/op 0 B/op 0 allocs/op |
1.06 |
BenchmarkSplayTree/random_access_300000 - ns/op |
0.04331 ns/op |
0.0408 ns/op |
1.06 |
BenchmarkSplayTree/random_access_300000 - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/random_access_300000 - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSplayTree/editing_trace_bench |
0.001954 ns/op 0 B/op 0 allocs/op |
0.001675 ns/op 0 B/op 0 allocs/op |
1.17 |
BenchmarkSplayTree/editing_trace_bench - ns/op |
0.001954 ns/op |
0.001675 ns/op |
1.17 |
BenchmarkSplayTree/editing_trace_bench - B/op |
0 B/op |
0 B/op |
1 |
BenchmarkSplayTree/editing_trace_bench - allocs/op |
0 allocs/op |
0 allocs/op |
1 |
BenchmarkSync/memory_sync_10_test |
8387 ns/op 3765 B/op 69 allocs/op |
8118 ns/op 3765 B/op 69 allocs/op |
1.03 |
BenchmarkSync/memory_sync_10_test - ns/op |
8387 ns/op |
8118 ns/op |
1.03 |
BenchmarkSync/memory_sync_10_test - B/op |
3765 B/op |
3765 B/op |
1 |
BenchmarkSync/memory_sync_10_test - allocs/op |
69 allocs/op |
69 allocs/op |
1 |
BenchmarkSync/memory_sync_100_test |
54197 ns/op 11122 B/op 304 allocs/op |
53734 ns/op 11121 B/op 304 allocs/op |
1.01 |
BenchmarkSync/memory_sync_100_test - ns/op |
54197 ns/op |
53734 ns/op |
1.01 |
BenchmarkSync/memory_sync_100_test - B/op |
11122 B/op |
11121 B/op |
1.00 |
BenchmarkSync/memory_sync_100_test - allocs/op |
304 allocs/op |
304 allocs/op |
1 |
BenchmarkSync/memory_sync_1000_test |
591797 ns/op 77285 B/op 2167 allocs/op |
592396 ns/op 77004 B/op 2149 allocs/op |
1.00 |
BenchmarkSync/memory_sync_1000_test - ns/op |
591797 ns/op |
592396 ns/op |
1.00 |
BenchmarkSync/memory_sync_1000_test - B/op |
77285 B/op |
77004 B/op |
1.00 |
BenchmarkSync/memory_sync_1000_test - allocs/op |
2167 allocs/op |
2149 allocs/op |
1.01 |
BenchmarkSync/memory_sync_10000_test |
7512073 ns/op 757969 B/op 20515 allocs/op |
7180623 ns/op 759959 B/op 20497 allocs/op |
1.05 |
BenchmarkSync/memory_sync_10000_test - ns/op |
7512073 ns/op |
7180623 ns/op |
1.05 |
BenchmarkSync/memory_sync_10000_test - B/op |
757969 B/op |
759959 B/op |
1.00 |
BenchmarkSync/memory_sync_10000_test - allocs/op |
20515 allocs/op |
20497 allocs/op |
1.00 |
BenchmarkTextEditing |
5067718953 ns/op 3982575696 B/op 20647648 allocs/op |
4921928140 ns/op 3982631696 B/op 20647746 allocs/op |
1.03 |
BenchmarkTextEditing - ns/op |
5067718953 ns/op |
4921928140 ns/op |
1.03 |
BenchmarkTextEditing - B/op |
3982575696 B/op |
3982631696 B/op |
1.00 |
BenchmarkTextEditing - allocs/op |
20647648 allocs/op |
20647746 allocs/op |
1.00 |
BenchmarkTree/10000_vertices_to_protobuf |
4090955 ns/op 6265173 B/op 70025 allocs/op |
4279976 ns/op 6263011 B/op 70025 allocs/op |
0.96 |
BenchmarkTree/10000_vertices_to_protobuf - ns/op |
4090955 ns/op |
4279976 ns/op |
0.96 |
BenchmarkTree/10000_vertices_to_protobuf - B/op |
6265173 B/op |
6263011 B/op |
1.00 |
BenchmarkTree/10000_vertices_to_protobuf - allocs/op |
70025 allocs/op |
70025 allocs/op |
1 |
BenchmarkTree/10000_vertices_from_protobuf |
221924076 ns/op 442173500 B/op 290039 allocs/op |
217420078 ns/op 442171851 B/op 290038 allocs/op |
1.02 |
BenchmarkTree/10000_vertices_from_protobuf - ns/op |
221924076 ns/op |
217420078 ns/op |
1.02 |
BenchmarkTree/10000_vertices_from_protobuf - B/op |
442173500 B/op |
442171851 B/op |
1.00 |
BenchmarkTree/10000_vertices_from_protobuf - allocs/op |
290039 allocs/op |
290038 allocs/op |
1.00 |
BenchmarkTree/20000_vertices_to_protobuf |
8902849 ns/op 12716873 B/op 140028 allocs/op |
8717739 ns/op 12716934 B/op 140028 allocs/op |
1.02 |
BenchmarkTree/20000_vertices_to_protobuf - ns/op |
8902849 ns/op |
8717739 ns/op |
1.02 |
BenchmarkTree/20000_vertices_to_protobuf - B/op |
12716873 B/op |
12716934 B/op |
1.00 |
BenchmarkTree/20000_vertices_to_protobuf - allocs/op |
140028 allocs/op |
140028 allocs/op |
1 |
BenchmarkTree/20000_vertices_from_protobuf |
875075240 ns/op 1697272416 B/op 580089 allocs/op |
855121031 ns/op 1697268720 B/op 580091 allocs/op |
1.02 |
BenchmarkTree/20000_vertices_from_protobuf - ns/op |
875075240 ns/op |
855121031 ns/op |
1.02 |
BenchmarkTree/20000_vertices_from_protobuf - B/op |
1697272416 B/op |
1697268720 B/op |
1.00 |
BenchmarkTree/20000_vertices_from_protobuf - allocs/op |
580089 allocs/op |
580091 allocs/op |
1.00 |
BenchmarkTree/30000_vertices_to_protobuf |
14102194 ns/op 19318363 B/op 210030 allocs/op |
13322028 ns/op 19326246 B/op 210030 allocs/op |
1.06 |
BenchmarkTree/30000_vertices_to_protobuf - ns/op |
14102194 ns/op |
13322028 ns/op |
1.06 |
BenchmarkTree/30000_vertices_to_protobuf - B/op |
19318363 B/op |
19326246 B/op |
1.00 |
BenchmarkTree/30000_vertices_to_protobuf - allocs/op |
210030 allocs/op |
210030 allocs/op |
1 |
BenchmarkTree/30000_vertices_from_protobuf |
1984191948 ns/op 3752035736 B/op 870046 allocs/op |
1948119837 ns/op 3752051928 B/op 870046 allocs/op |
1.02 |
BenchmarkTree/30000_vertices_from_protobuf - ns/op |
1984191948 ns/op |
1948119837 ns/op |
1.02 |
BenchmarkTree/30000_vertices_from_protobuf - B/op |
3752035736 B/op |
3752051928 B/op |
1.00 |
BenchmarkTree/30000_vertices_from_protobuf - allocs/op |
870046 allocs/op |
870046 allocs/op |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
What this PR does / why we need it:
Since we found GC error in #1089.
We decided to leave detached client's lamport in every version vector(local document and min version vector) for now and look for a solution later.
I modified following items
Which issue(s) this PR fixes:
Fixes #1089
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist:
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Tests