You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Chia-Ping Tsai (JIRA)" <ji...@apache.org> on 2018/02/16 18:03:00 UTC

[jira] [Updated] (HBASE-19680) BufferedMutatorImpl#mutate should wait the result from AP in order to throw the failed mutations

     [ https://issues.apache.org/jira/browse/HBASE-19680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chia-Ping Tsai updated HBASE-19680:
-----------------------------------
    Status: Open  (was: Patch Available)

Oh...run the patch with a bunch of threads. Ya, there is a concurrent issue...

The change to fix the concurrent issue is shown below. 
{code:java}
AsyncRequestFuture asf;
try (QueueRowAccess access = new QueueRowAccess()) {
  if (access.isEmpty()) {
    // It means someone has gotten the ticker to run the flush.
    break;
  }
  asf = ap.submit(createTask(access));
}
// DON'T do the wait in the try-with-resources. Otherwise, the undealt mutations won't
// be released.
asf.waitUntilDone();
if (asf.hasError()) {
  errors.add(asf.getErrors());
}{code}

> BufferedMutatorImpl#mutate should wait the result from AP in order to throw the failed mutations
> ------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-19680
>                 URL: https://issues.apache.org/jira/browse/HBASE-19680
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Major
>             Fix For: 2.0.0-beta-2
>
>         Attachments: HBASE-19680.v0.patch, HBASE-19680.v1.patch
>
>
> Currently, BMI#mutate doesn't wait the result from AP so the errors are stored in AP. The only way which can return the errors to user is, calling the flush to catch the exception. That is non-intuitive.
> I feel BMI#mutate should wait the result. That is to say, user can parse the exception thrown by BM#mutate to get the failed mutations. Also, we can remove the global error from AP.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)