Fix misbehaviour of value_found in DBImpl::KeyMayExist.#12935
Conversation
8bbe2bc to
61bba81
Compare
alanpaxton
left a comment
There was a problem hiding this comment.
LGTM - just my usual "can we add a test"..
Could you link to the ticket (Closes ...) in the description ?
| // In this case, key may still exist in the table. | ||
| if(value_found != nullptr && s.IsIncomplete()) { | ||
| if (value_found != nullptr && s.IsIncomplete()) { | ||
| // falsify later if key-may-exist but can't fetch value |
There was a problem hiding this comment.
Is it feasible to make a test for this case ?
There was a problem hiding this comment.
@alanpaxton I have test in Java, do yo think I should also write test in C++?
There was a problem hiding this comment.
@rhubner I was unclear. I mean to say, can you test the case where keyMayExist but has_value is false ? I presume the functionality you have tested in Java already has C++ tests.
It is probably easier to have a C++ test for this case. My principle with the Java API is that we need to test going from Java to C++ and back. This is usually best achieved by having a Java test which basically mirrors the C++ test.
12373e1 to
ee118c8
Compare
422fe80 to
e798802
Compare
e798802 to
4e0d49b
Compare
4e0d49b to
2ce8f48
Compare
2ce8f48 to
4f037ea
Compare
KeyMayExistsetvalue_foundby default to true. Then if the value is not in cache, TTLDB returnsfalsebecause it thinks the value vas found and then mark it as corrupted. False is returned even for values which are in TTLDB.Fix #12921