apache / accumulo

Apache Accumulo
https://accumulo.apache.org
Apache License 2.0
1.07k stars 446 forks source link

Retry when conncurrent merge happens in bulk import. #471

Closed keith-turner closed 5 years ago

keith-turner commented 6 years ago

This is follow up work to #436. Currently, the new bulk import API detects concurrent merges and throws an exception. It would be better to retry.

milleruntime commented 5 years ago

I just saw this running random walk concurrent test on 2.0.

java.lang.Exception: Error running node Concurrent.xml
    at org.apache.accumulo.testing.randomwalk.Module.visit(Module.java:370)
    at org.apache.accumulo.testing.randomwalk.Framework.run(Framework.java:48)
    at org.apache.accumulo.testing.randomwalk.Framework.main(Framework.java:92)
Caused by: java.lang.Exception: Error running node ct.BulkImport
    at org.apache.accumulo.testing.randomwalk.Module.visit(Module.java:370)
    at org.apache.accumulo.testing.randomwalk.Module$1.call(Module.java:303)
    at org.apache.accumulo.testing.randomwalk.Module$1.call(Module.java:298)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:35)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.accumulo.core.client.AccumuloException: Concurrent merge happened
    at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:385)
    at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:342)
    at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doBulkFateOperation(TableOperationsImpl.java:329)
    at org.apache.accumulo.core.clientImpl.bulk.BulkImport.load(BulkImport.java:142)
    at org.apache.accumulo.testing.randomwalk.concurrent.BulkImport.visit(BulkImport.java:130)
    ... 9 more
Caused by: ThriftTableOperationException(tableId:a49, tableName:null, op:BULK_IMPORT, type:OTHER, description:Concurrent merge happened)
    at org.apache.accumulo.core.master.thrift.FateService$waitForFateOperation_result$waitForFateOperation_resultStandardScheme.read(FateService.java:4729)
    at org.apache.accumulo.core.master.thrift.FateService$waitForFateOperation_result$waitForFateOperation_resultStandardScheme.read(FateService.java:4698)
    at org.apache.accumulo.core.master.thrift.FateService$waitForFateOperation_result.read(FateService.java:4624)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:88)
    at org.apache.accumulo.core.master.thrift.FateService$Client.recv_waitForFateOperation(FateService.java:155)
    at org.apache.accumulo.core.master.thrift.FateService$Client.waitForFateOperation(FateService.java:140)
    at org.apache.accumulo.core.clientImpl.TableOperationsImpl.waitForFateOperation(TableOperationsImpl.java:292)
    at org.apache.accumulo.core.clientImpl.TableOperationsImpl.doFateOperation(TableOperationsImpl.java:358)
    ... 13 more