-
Notifications
You must be signed in to change notification settings - Fork 19.9k
Refactor existing LWWElementSet implementation #6164
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
Conversation
…s comparison - Replaced int timestamps with Instant for improved precision - Refactored class to be generic, allowing support for different types of elements - Removed bias-based comparison to align with LWW-Element-Set - Reference: https://inria.hal.science/inria-00555588v1/document
- Updated existing test cases to align with changes in LWWElementSet implementation - Improved test readability and coverage
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6164 +/- ##
============================================
+ Coverage 73.94% 73.98% +0.03%
+ Complexity 5161 5159 -2
============================================
Files 662 662
Lines 17695 17681 -14
Branches 3412 3407 -5
============================================
- Hits 13085 13081 -4
+ Misses 4102 4097 -5
+ Partials 508 503 -5 ☔ 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.
Looks good, thanks!
Refactor of the existing LWWElementSet Implementation:
Added generic support to allow the set to store any type of element.
Updated Javadoc to reflect changes and improve clarity.
Refactored timestamp comparison to remove bias, following the recommendations outlined in A comprehensive study of Convergent and Commutative Replicated Data Types.
Removed the unused
compare
method, which is no longer needed due to updated timestamp comparison logic.Updated existing test cases to align with changes in LWWElementSet implementation
Improved test readability and coverage
I have read CONTRIBUTING.md.
This pull request is all my own work -- I have not plagiarized it.
All filenames are in PascalCase.
All functions and variable names follow Java naming conventions.
All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
All new code is formatted with
clang-format -i --style=file path/to/your/file.java