-
Notifications
You must be signed in to change notification settings - Fork 137
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
implement btree.item on item itelf, not only its pointer. #254
Conversation
memdb.go
Outdated
@@ -32,6 +32,14 @@ func (i *item) Less(other btree.Item) bool { | |||
return bytes.Compare(i.key, other.(*item).key) == -1 | |||
} | |||
|
|||
// LessDirect implements btree.Item directly on item instead of its pointer. | |||
// Question: is this it, or do we need to get the pointer off of other.(*item).key? |
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.
this is the question
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
=======================================
Coverage 68.54% 68.54%
=======================================
Files 27 27
Lines 2130 2130
=======================================
Hits 1460 1460
Misses 595 595
Partials 75 75
|
If the goal is to implement the interface on both It should satisfy the core request of #186 to update all the existing methods without adding any new ones. However, for it to be useful we'd probably also have to update the code that generates items to not allocate them. |
Thanks @catShaark ! |
Closes: #186
@ValarDragon I think that this is correct, but I did have one question