bbeaudreault commented on code in PR #4347:
URL: https://github.com/apache/hbase/pull/4347#discussion_r857734038


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSink.java:
##########
@@ -193,6 +193,7 @@ public void replicateEntries(List<WALEntry> entries, final 
CellScanner cells,
             for (int i = 0; i < count; i++) {
               // Throw index out of bounds if our cell count is off
               if (!cells.advance()) {
+                this.metrics.incrementFailedBatches();

Review Comment:
   Looks like you're catching Exception below, and incrementing there as well. 
Will this result in double-incrementing for these 
ArrayIndexOutOfBoundExceptions?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/MetricsSink.java:
##########
@@ -84,6 +84,20 @@ public void applyBatch(long batchSize, long hfileSize) {
     mss.incrAppliedHFiles(hfileSize);
   }
 
+  /**
+   * Convenience method to update metrics when batch of operations has failed.
+   */
+  public void incrementFailedBatches(){
+    mss.incrFailedBatches();
+  }
+
+  /** Get the count of the failed bathes

Review Comment:
   nit: can you fix the formatting here? (move "Get..." to next line)



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