-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove priority queue from RhtPQMap and entire project #84
Conversation
val node = nodeMapByCreatedAt[createdAt] | ||
?: throw NoSuchElementException("The ElementRhtNode by $createdAt doesn't exist.") | ||
node.remove(executedAt) | ||
return node.value |
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.
@hackerwins I returned the node.value
regardless of whether or not the node.remove()
returned true, based on the JS-SDK.
val node = nodeMapByKey[key] | ||
?: throw NoSuchElementException("$key doesn't exist in nodeMapByKey") | ||
node.remove(removedAt) | ||
return node.value |
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.
@hackerwins I returned the node.value
in the same way as the remove()
function above. This approach differs slightly from the JS-SDK, so I will adjust it if it could cause any issues.
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.
fixed it to return nullable value ac9080f
Codecov Report
@@ Coverage Diff @@
## main #84 +/- ##
==========================================
+ Coverage 81.48% 81.80% +0.31%
==========================================
Files 52 52
Lines 2377 2358 -19
Branches 336 334 -2
==========================================
- Hits 1937 1929 -8
+ Misses 257 250 -7
+ Partials 183 179 -4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
What this PR does / why we need it?
RhtPQMap
to use less memory by removing the priority queue.RhtPQMap
has been renamed toElementRht
.Any background context you want to provide?
What are the relevant tickets?
yorkie-team/yorkie#462, yorkie-team/yorkie#423
Checklist