reddycharan commented on a change in pull request #2090: Update and flush 
lastLogMark when replaying journal
URL: https://github.com/apache/bookkeeper/pull/2090#discussion_r282595592
 
 

 ##########
 File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
 ##########
 @@ -821,6 +821,9 @@ public void scanJournal(long journalId, long journalPos, 
JournalScanner scanner)
                     scanner.process(journalVersion, offset, recBuff);
                 }
             }
+            // Update LastLogMark to EOF position after replaying journal
+            // After force flush of LedgerStorage, SyncThread will persist 
this to disk
+            lastLogMark.setCurLogMark(journalId, recLog.fc.position());
 
 Review comment:
   @karanmehta93 in retrospect, i think this may not be right place to update 
the lastLogMark. It should be part of the scanner (JournalScanner) logic. Not 
all scanners add entries to LedgerStorage, so this update logic should be part 
of JournalScanner, which is created in Bookie.readJournal method.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to