busbey commented on a change in pull request #305: HBASE-22577
BufferedMutatorOverAsyncBufferedMutator.tryCompleteFuture…
URL: https://github.com/apache/hbase/pull/305#discussion_r293470697
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorOverAsyncBufferedMutator.java
##########
@@ -100,62 +103,63 @@ private RetriesExhaustedWithDetailsException makeError()
{
return new RetriesExhaustedWithDetailsException(throwables, rows,
hostnameAndPorts);
}
+ private void internalFlush() throws RetriesExhaustedWithDetailsException {
+ // should get the future array before calling mutator.flush, otherwise we
may hit an infinite
+ // wait, since someone may add new future to the map after we calling the
flush.
+ CompletableFuture<?>[] toWait = futures.keySet().toArray(new
CompletableFuture<?>[0]);
+ mutator.flush();
+ try {
+ CompletableFuture.allOf(toWait).join();
+ } catch (CompletionException e) {
+ // just ignore, we will record the actual error in the errors field
Review comment:
please add a DEBUG or TRACE log message with the exception. If something
goes wrong with the errors field handling we need some way for operators to get
a log message with what's going on.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services