-
Notifications
You must be signed in to change notification settings - Fork 104
Change VersionVector actorID encoding from hex to base64 #1030
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
To reduce the size of serialized VersionVectors, the actorID encoding format has been changed from hex string to base64. Since actorIDs are used as keys in VersionVector objects and frequently transferred in network messages, reducing their length helps decrease payload size and improve performance. This change does not affect the semantics of the actorID, only its encoded representation.
WalkthroughThe conversion logic for Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Converter
participant Protobuf
Client->>Converter: toVersionVector(versionVector)
Converter->>Converter: Convert actor IDs from hex to Uint8Array
Converter->>Converter: Encode Uint8Array to base64
Converter->>Protobuf: Store base64 as keys in vector map
Protobuf->>Converter: fromVersionVector(protoVector)
Converter->>Converter: Decode base64 keys to Uint8Array
Converter->>Converter: Convert Uint8Array to hex strings
Converter->>Client: Return reconstructed VersionVector
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
3f1f084
to
0d6a2da
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1030 +/- ##
==========================================
- Coverage 78.10% 77.91% -0.19%
==========================================
Files 66 66
Lines 5764 5788 +24
Branches 1043 1049 +6
==========================================
+ Hits 4502 4510 +8
- Misses 951 963 +12
- Partials 311 315 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 your contribution.
What this PR does / why we need it?
To reduce the size of serialized VersionVectors, the actorID encoding format has been changed from hex string to base64. Since actorIDs are used as keys in VersionVector objects and frequently transferred in network messages, reducing their length helps decrease payload size and improve performance. This change does not affect the semantics of the actorID, only its encoded representation.
Any background context you want to provide?
What are the relevant tickets?
Related to yorkie-team/yorkie#1388
Checklist
Summary by CodeRabbit
Summary by CodeRabbit