-
Notifications
You must be signed in to change notification settings - Fork 472
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
GetMetaData() returns wrong status #1535
Comments
Hi @xumingbo Could you provide the core dump stack or where's crash location is? And for the expiration metadata, I think it's good to regard it as the not found error since we don't need to know if it's an expired key or not found key |
I wonder why it's neccessary to change it to |
|
|
We (Akamai) are implementing CRDT data type. It needs to handle physical NotFound and Expired (logical not found) differently. We can circumvent this bug, by overriding GetMetaData(). I think it is helpful to report it here. |
@xumingbo For test case failure, you need to modify the corresponding status check as well. But for this case, how about checking if the key was expired by the error message?
Also contribute back the CRDT feature if you would like. |
kvrocks/tests/cppunit/t_hash_test.cc Lines 68 to 69 in 17b31e7
From a first glance, the abort in test case seems due to that the |
Close this PR due to lack of inactive, free feel to reopen if needed. |
Search before asking
Version
kvrocks 2.2.0.
Minimal reproduce step
Line 51 of storage/redis_db.cc
GetMetaData() returns "NotFound" when expired.
if (metadata->Expired()) {
metadata->Decode(old_metadata);
return rocksdb::Status::NotFound(kErrMsgKeyExpired);
}
What did you expect to see?
if (metadata->Expired()) {
metadata->Decode(old_metadata);
return rocksdb::Status::Expired(kErrMsgKeyExpired);
}
What did you see instead?
I tried to fix it by changing "NotFound" to "Expired", it caused:
cppunit/t_hash_test.cc:69: Failure, and coredump
Anything Else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: