-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Introduce Hybrid vector clock #786
Closed
Closed
Conversation
This file contains 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
highcloud100
force-pushed
the
hybrid_vector_clock
branch
from
February 6, 2024 02:45
70ba504
to
3f54faa
Compare
1. Add synced vector map in document. 2. Add self vector clock in Change 3. Modify gc to work with min synced vector
1. Old actor id does't convert to new in syncedVectorMap 2. Change the gc criteria to RemovedAt
1. replace text edit's latestCreatedAtMapByActor with vector clock. 2. Fix gc timing in gc_test.go, because gc changed to use vectorclock 3. Because it is used in text edit, context includes current vector.
1. Fix MinSyncedVector and add relevant test. 2. Fix duplicate vectorClock updates due to pre `context` update commit. 3. Modify gc_test.go to fit hybrid vector clock, except detach test.
1. server store synced vector map in snapshot_info. 2. The client also receives vector clock when pulling pack from the snapshot, and replace it's vector map with pulled vector map.
highcloud100
force-pushed
the
hybrid_vector_clock
branch
from
February 8, 2024 05:14
df3d4d4
to
80f8987
Compare
Related to #789 |
1. Calculate minimum vector only when garbage is present. 2. Copy depth when inserting vector clocks into Change.
hackerwins
reviewed
Feb 10, 2024
1. Now Change has detach flag. It used to delete vectorclock of detached Actor.
1. Now snapshot save latest vector clock not SVM. 2. Clients build their own SVM using the latest VectorClock in snapshots. - So client's SVM is not latest state, it doesn't know peer's vector clock. It need more check - This is due to the overhead of storing and transferring SVMs. #789
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #786 +/- ##
==========================================
- Coverage 50.71% 50.35% -0.37%
==========================================
Files 70 71 +1
Lines 10213 10397 +184
==========================================
+ Hits 5180 5235 +55
- Misses 4512 4632 +120
- Partials 521 530 +9 ☔ View full report in Codecov by Sentry. |
2 tasks
This approach is silly. - slow and behave like client. - Server track all logs of clients, so we don't need calculate min synced vector every time.
Terminology - change's vector clock -> vector clock - change's latest vector clock -> version vector - each document's vector clock -> version vector - min synced vector clock -> synced version vector - snapshot's vector clock -> latest version vector
2 tasks
This continues at #800. |
2 tasks
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.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Address #723
Special notes for your reviewer:
https://hackmd.io/kfaV_ZAgSX-REVyKRnoU1Q?view
https://hackmd.io/ogc6dOGkRW-At6O8SmiDrg?both#3-vector-clock%EC%9D%98-%ED%95%84%EC%9A%94%EC%84%B1
Does this PR introduce a user-facing change?:
Additional documentation:
Checklist: