-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add support for C bindings to the compaction V2 filter mechanism. #224
Add support for C bindings to the compaction V2 filter mechanism. #224
Conversation
Test Plan: make c_test && ./c_test Some fixes after merge.
@@ -2862,9 +2837,22 @@ void DBImpl::CallCompactionFilterV2(CompactionState* compact, | |||
return; | |||
} | |||
|
|||
// Assemble slice vectors for user keys and existing values. | |||
// We also keep traack of our parsed internal key structs because |
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.
track :)
create_compaction_filter_v2_.
Wow, thanks for finding this bug. I'm surprised how it didn't blow up in production :) |
…lter-v2-c-bindings Add support for C bindings to the compaction V2 filter mechanism.
Yeah, I'm surprised too. It failed immediately from the c_test compaction filter v2 unittest I wrote. Thanks for the quick turnaround! |
There was a compile error in c_test that I fixed with 323d6e3. Let me know if that's not the correct fix. Thanks for contributing! |
valgrind failure of c_test. Likely caused by one of those commits. @spencerkimball can you take a look? Commit c1f588a by spencerk Commit 38e8b72 by spencerk Commit 323d6e3 by icanadi ==12920== |
Sure. Sent a PR to address this. On Thu, Aug 7, 2014 at 5:53 PM, Siying Dong [email protected]
|
Thanks guys. |
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]> Signed-off-by: tabokie <[email protected]>
Signed-off-by: Xintao <[email protected]> Signed-off-by: tabokie <[email protected]> (cherry picked from commit bbd27cf)
Signed-off-by: Xintao <[email protected]> Signed-off-by: tabokie <[email protected]> (cherry picked from commit bbd27cf)
Signed-off-by: Xintao <[email protected]>
Signed-off-by: Xintao <[email protected]> Signed-off-by: tabokie <[email protected]>
Some pressing bug fixes to the db_impl.cc v2 compaction pipeline. In particular, the compact object was keeping vectors of string copies for keys and values and also vectors of Slice objects references the underlying string copies. However, the vectors of the string copies are likely to resize, resulting in strings being reallocated and the slices becoming invalid. The fixes in this PR to db_impl.cc delay the creation of the SliceVectors until after the string copy vectors have been fully built.
Test Plan: make c_test && ./c_test