d-c-manning commented on code in PR #7363:
URL: https://github.com/apache/hbase/pull/7363#discussion_r2493098473


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBufferedMutatorImpl.java:
##########
@@ -153,24 +220,45 @@ Stream.<CompletableFuture<Void>> 
generate(CompletableFuture::new).limit(mutation
       bufferedSize += heapSize;
       if (bufferedSize >= writeBufferSize) {
         LOG.trace("Flushing because write buffer size {} reached", 
writeBufferSize);
-        internalFlush();
-      } else if (maxMutations > 0 && this.mutations.size() >= maxMutations) {
+        // drain now and send after releasing the lock
+        batch = drainBatch();
+      } else if (this.mutations.size() >= maxMutations) {

Review Comment:
   did we lose the positive `maxMutations` check? (Looks like default is `-1` 
if I'm reading code correctly, which would lead to flush on every mutate.)
   ```suggestion
         } else if (maxMutations > 0 && this.mutations.size() >= maxMutations) {
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to