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

hrpc: add an option to skip retry #263

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

hrpc: add an option to skip retry #263

wants to merge 1 commit into from

Conversation

dethi
Copy link
Collaborator

@dethi dethi commented Jul 5, 2024

This let the caller tell GoHBase to no retry calls that failed. Otherwise, GoHBase will retry forever until cancellation of the context. But sometime, it is useful to to be able to say "try only once", without just relying on having a small context timeout.

One of the place where this is useful is when we try to close a scanner that we prematurely stopped, as this is just the client trying to be a good citizen. But most likely, if the request failed with a retryable error (region closed or moved, call queue too big, etc), by the time we manage to send the request the scanner lease would have been already expired on HBase side.

@dethi
Copy link
Collaborator Author

dethi commented Jul 5, 2024

TODO:

  • New unit test
  • Documentation

But open to feedback about the API itself, if someone think we should do this differently or not at all?

This let the caller tell GoHBase to no retry calls that failed.
Otherwise, GoHBase will retry forever until cancellation of the context.
But sometime, it is useful to to be able to say "try only once", without
just relying on having a small context timeout.

One of the place where this is useful is when we try to close a scanner
that we prematurely stopped, as this is just the client trying to be a
good citizen. But most likely, if the request failed with a retryable
error (region closed or moved, call queue too big, etc), by the time we
manage to send the request the scanner lease would have been already
expired on HBase side.
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.

1 participant