You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/04/25 15:06:46 UTC

[GitHub] [hbase] bbeaudreault commented on a diff in pull request #4347: HBASE-26581 Add metrics for failed replication edits

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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org