You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/02/16 17:00:04 UTC

[GitHub] jvrao commented on a change in pull request #1155: Issue #1152: stats for durability violations in write/read path

jvrao commented on a change in pull request #1155: Issue #1152: stats for durability violations in write/read path
URL: https://github.com/apache/bookkeeper/pull/1155#discussion_r168812865
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingAddOp.java
 ##########
 @@ -256,6 +258,12 @@ public void writeComplete(int rc, long ledgerId, long entryId, BookieSocketAddre
         }
 
         if (completed) {
+            if (rc != BKException.Code.OK) {
+                // Got an error after satisfying AQ. This means we are under replicated at the create itself.
+                // Update the stat to reflect it.
+                long latencyNanos = MathUtils.elapsedNanos(requestTimeNanos);
+                addOpUrLogger.registerFailedEvent(latencyNanos, TimeUnit.NANOSECONDS);
 
 Review comment:
   Initially, I was thinking of getting latency as we will know how long the failure took. But may be I can simply swithch to a counter. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services