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/03/17 03:41:12 UTC

[GitHub] sijie closed pull request #1271: Fixed journalQueueSize counter increment

sijie closed pull request #1271: Fixed journalQueueSize counter increment
URL: https://github.com/apache/bookkeeper/pull/1271
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
index 6173936f1..3d79acb59 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
@@ -854,7 +854,6 @@ public void logAddEntry(ByteBuffer entry, boolean ackBeforeSync, WriteCallback c
     public void logAddEntry(ByteBuf entry, boolean ackBeforeSync, WriteCallback cb, Object ctx) {
         long ledgerId = entry.getLong(entry.readerIndex() + 0);
         long entryId = entry.getLong(entry.readerIndex() + 8);
-        journalQueueSize.inc();
         logAddEntry(ledgerId, entryId, entry, ackBeforeSync, cb, ctx);
     }
 
@@ -864,6 +863,7 @@ void logAddEntry(long ledgerId, long entryId, ByteBuf entry,
         //Retain entry until it gets written to journal
         entry.retain();
 
+        journalQueueSize.inc();
         queue.add(QueueEntry.create(
                 entry, ackBeforeSync,  ledgerId, entryId, cb, ctx, MathUtils.nowInNano(),
                 journalAddEntryStats, journalQueueSize));


 

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