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

Should buffering gets be possible? #197

Open
jasonculverhouse opened this issue Sep 20, 2018 · 1 comment
Open

Should buffering gets be possible? #197

jasonculverhouse opened this issue Sep 20, 2018 · 1 comment
Labels

Comments

@jasonculverhouse
Copy link
Contributor

https://github.com/OpenTSDB/asynchbase/blob/master/src/RegionClient.java#L987

It seems like this code prevents the buffering but the comment indicates no buffering on the retry.

Should the conditions be change to?

      && !(rpc instanceof GetRequest && rpc.attempts > 1)
  void sendRpc(HBaseRpc rpc) {
    if (chan != null) {
      // Now {@link GetRequest} is also a {@link BatchableRpc}, we don't want to retry 
      // the get request once it fails.
      if (rpc instanceof BatchableRpc 
          && !(rpc instanceof GetRequest)
          && (server_version >= SERVER_VERSION_092_OR_ABOVE  // Before 0.92,
              || rpc instanceof PutRequest)) {  // we could only batch "put".
        final BatchableRpc edit = (BatchableRpc) rpc;
        if (edit.canBuffer() && hbase_client.getFlushInterval() > 0) {
          bufferEdit(edit);
          return;
        }
        addSingleEditCallbacks(edit);
      } else if (rpc instanceof MultiAction) {
@manolama
Copy link
Member

Yeah we'd like to be able to buffer those. Thanks for catching it!

@manolama manolama added the bug label Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants