Skip to content

region/client: send request timeout to HBase#215

Draft
dethi wants to merge 1 commit intomasterfrom
rpc-timeout
Draft

region/client: send request timeout to HBase#215
dethi wants to merge 1 commit intomasterfrom
rpc-timeout

Conversation

@dethi
Copy link
Copy Markdown
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?
Comment thread region/client.go
RequestParam: proto.Bool(true),
}

deadline, ok := rpc.Context().Deadline()
Copy link
Copy Markdown
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