phrocker commented on a change in pull request #1152: Fix #1120 - Improve batch 
writer throughput
URL: https://github.com/apache/accumulo/pull/1152#discussion_r311629939
 
 

 ##########
 File path: 
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletServerBatchWriter.java
 ##########
 @@ -280,8 +284,17 @@ public synchronized void addMutation(TableId table, 
Mutation m)
     mutations.addMutation(table, m);
     totalAdded++;
 
-    if (mutations.getMemoryUsed() >= maxMem / 2) {
-      startProcessing();
+    if (mutations.getMemoryUsed() >= maxMem / MAX_MEMORY_DIVISOR) {
+      if (!somethingFailed) {
+        startProcessing();
+        consecutiveFailedProcessCalls.set(0);
+      } else
+        consecutiveFailedProcessCalls.getAndIncrement();
 
 Review comment:
   Could you not merge this and the conditional for >= 5000 ? if nothing failed 
then you'd never hit the conditional anyway. 

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