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/19 17:57:53 UTC

[GitHub] sijie closed pull request #1276: Fix logging issue on PendingReadOp

sijie closed pull request #1276: Fix logging issue on PendingReadOp
URL: https://github.com/apache/bookkeeper/pull/1276
 
 
   

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/client/PendingReadOp.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
index d596eee97..484e9c734 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
@@ -135,7 +135,7 @@ public void close() {
         boolean complete(int bookieIndex, BookieSocketAddress host, final ByteBuf buffer) {
             ByteBuf content;
             try {
-                content = lh.macManager.verifyDigestAndReturnData(entryImpl.getEntryId(), buffer);
+                content = lh.macManager.verifyDigestAndReturnData(eId, buffer);
             } catch (BKDigestMatchException e) {
                 readOpDmCounter.inc();
                 logErrorAndReattemptRead(bookieIndex, host, "Mac mismatch", BKException.Code.DigestMatchException);
@@ -205,12 +205,12 @@ synchronized void logErrorAndReattemptRead(int bookieIndex, BookieSocketAddress
                 ++numBookiesMissingEntry;
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("No such entry found on bookie.  L{} E{} bookie: {}",
-                            lh.ledgerId, entryImpl.getEntryId(), host);
+                            lh.ledgerId, eId, host);
                 }
             } else {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug(errMsg + " while reading L{} E{} from bookie: {}",
-                            lh.ledgerId, entryImpl.getEntryId(), host);
+                            lh.ledgerId, eId, host);
                 }
             }
         }
@@ -245,7 +245,7 @@ int getRc() {
 
         @Override
         public String toString() {
-            return String.format("L%d-E%d", entryImpl.getLedgerId(), entryImpl.getEntryId());
+            return String.format("L%d-E%d", lh.getId(), eId);
         }
 
         /**
@@ -569,7 +569,7 @@ void sendReadTo(int bookieIndex, BookieSocketAddress to, LedgerEntryRequest entr
         }
 
         int flags = isRecoveryRead ? BookieProtocol.FLAG_HIGH_PRIORITY : BookieProtocol.FLAG_NONE;
-        lh.bk.getBookieClient().readEntry(to, lh.ledgerId, entry.entryImpl.getEntryId(),
+        lh.bk.getBookieClient().readEntry(to, lh.ledgerId, entry.eId,
                                           this, new ReadContext(bookieIndex, to, entry),
                                           flags);
     }
@@ -624,7 +624,7 @@ protected void submitCallback(int code) {
             long firstUnread = LedgerHandle.INVALID_ENTRY_ID;
             for (LedgerEntryRequest req : seq) {
                 if (!req.isComplete()) {
-                    firstUnread = req.entryImpl.getEntryId();
+                    firstUnread = req.eId;
                     break;
                 }
             }


 

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