-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
storage: return memory locks as BatchGet response level error #9077
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
src/server/service/kv.rs
Outdated
resp.set_pairs(pairs.into()); | ||
} | ||
Err(e) => { | ||
resp.set_error(extract_key_error(&e)); |
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.
Is it backward compatible? What if an error except KeyIsLocked
in replica read is reported?
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.
Indeed. It looks possible for async_snapshot
to return some weird errors like Timeout
or some unexpected errors. Then, an old client may not handle the error correctly.
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.
I keep the error in the first kvpair. PTAL again.
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
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
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@MyonKeminta PTAL |
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
/merge |
/run-all-tests |
@sticnarf merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
/merge |
Your auto merge job has been accepted, waiting for:
|
@sticnarf merge failed. |
/run-all-tests |
/merge |
/run-all-tests |
@sticnarf merge failed. |
/merge |
/run-all-tests |
What problem does this PR solve?
Issue Number: #9069
What is changed and how it works?
Set memory lock to the newly added
KeyError
field inBatchGetResponse
. The client will skip usingpairs
if the error is used.Related changes
Check List
Tests
Release note