sijie commented on a change in pull request #1201: ISSUE #570: Entrylog per
ledger
URL: https://github.com/apache/bookkeeper/pull/1201#discussion_r170563382
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/EntryLogger.java
##########
@@ -506,78 +498,86 @@ void createNewLog() throws IOException {
EntryLoggerAllocator getEntryLoggerAllocator() {
return entryLoggerAllocator;
}
+
/**
* Append the ledger map at the end of the entry log.
* Updates the entry log file header with the offset and size of the map.
*/
- private void appendLedgersMap(BufferedLogChannel entryLogChannel) throws
IOException {
- long ledgerMapOffset = entryLogChannel.position();
-
- ConcurrentLongLongHashMap ledgersMap = entryLogChannel.getLedgersMap();
- int numberOfLedgers = (int) ledgersMap.size();
+ private void appendLedgersMap(Long ledgerId) throws IOException {
Review comment:
I think a better change here is to move `appendLedgersMap` as part of
`BufferedLogChannel`. so this method doesn't have to be aware of `ledgerId`.
the awareness of `ledgerId` should be in per ledger log manager.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services