Apache9 commented on a change in pull request #343: HBASE-22634 : Improve 
performance of BufferedMutator        
URL: https://github.com/apache/hbase/pull/343#discussion_r311534208
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/BufferedMutatorImpl.java
 ##########
 @@ -302,11 +348,53 @@ private void doFlush(boolean flushAll) throws 
InterruptedIOException,
         }
         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());
+
+      if (flushAll || writeBufferSize == 0) {
+        // if we have setWriteBufferPeriodicFlushTimeoutMs we may have 
concurrent update
+        List<AsyncRequestFuture> waitList;
+        synchronized(asfList) {
 
 Review comment:
   Oh, I see, BufferedMutator is thread safe, so multiple threads can enter 
this method at the same time and we want them to share the safe asfList, so it 
should be class member.

----------------------------------------------------------------
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

Reply via email to