-
Notifications
You must be signed in to change notification settings - Fork 939
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
fix: fix defrag stats #1740
fix: fix defrag stats #1740
Conversation
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
What is being done on other data structures? |
Nothing, this is a follow up on #1727 |
Co-authored-by: Kostas Kyrimis <kostaskyrim@gmail.com> Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
src/core/compact_object_test.cc
Outdated
@@ -634,7 +634,7 @@ TEST_F(CompactObjectTest, DefragHash) { | |||
|
|||
// Trigger re-allocation | |||
cobj_.InitRobj(OBJ_HASH, kEncodingListPack, target_lp); | |||
cobj_.DefragIfNeeded(0.8); | |||
CHECK(cobj_.DefragIfNeeded(0.8)); |
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.
assert_true
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.
true
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
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.
LGTM
* fix: fix defrag stats Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
Fixes a bug from the hash defrag PR: Successful re-allocations are not reported back.
Should we count a hash re-allocation as one (currently doing so) or also count every internal re-allocation (each StringMap key, etc.) ?