Skip to content

hrpc: add an option to skip retry#263

Draft
dethi wants to merge 1 commit intomasterfrom
skip-rpc-retry
Draft

hrpc: add an option to skip retry#263
dethi wants to merge 1 commit intomasterfrom
skip-rpc-retry

Conversation

@dethi
Copy link
Copy Markdown
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
Copy Markdown
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.
@dethi dethi force-pushed the skip-rpc-retry branch from c5a444c to 032b058 Compare July 5, 2024 18:25
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