Skip to content
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

region/client: send request timeout to HBase #215

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

dethi
Copy link
Collaborator

@dethi dethi commented Mar 21, 2023

TODO:

  • how to write a test for this?
  • what exception is returned?
  • are we guaranteed to get a reply if the request timeout?
  • what if the requests is dropped from the queue?

TODO:
- how to write a test for this?
- what exception is returned?
- are we guaranteed to get a reply if the request timeout?
- what if the requests is dropped from the queue?
@@ -626,6 +626,15 @@ func (c *client) send(rpc hrpc.Call) (uint32, error) {
RequestParam: proto.Bool(true),
}

deadline, ok := rpc.Context().Deadline()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to work for requests sent in multi's, ie. all mutate requests, since a multi's Context() method just returns context.Background().

Maybe you don't care about that case. Just wanted to raise it in case you weren't aware. If you did want it to work for multi's you'd probably have to find the latest Deadline among the requests and use that as your timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants