reddycharan commented on a change in pull request #1374: BP-32: Advisory (optimistic) write close URL: https://github.com/apache/bookkeeper/pull/1374#discussion_r185068329
########## File path: site/bps/BP-32-advisory-write-close.md ########## @@ -0,0 +1,54 @@ +--- +title: "BP-32: Advisory (optimistic) write close" +issue: https://github.com/apache/bookkeeper/issues/1343 +state: Under Discussion +release: N/A +--- + +### Motivation + +With entrylog per ledger feature (https://github.com/apache/bookkeeper/issues/570) there will be dedicated entrylog for each ledger and it provides EntryLogManagerForEntryLogPerLedger (EntryLogManager). Since there is going to be entrylog per ledger, with the current Bookie implementation there is no way for EntryLogManagerForEntryLogPerLedger (EntryLogManager) to know when the entrylog is writeclosed, so that entrylog for the active ledger can be rotated. So it would be ideal to have explicit call to EntryLogger when the write for this ledger is done and it is writeclosed, so that it can rotate the entrylog as soon as it is write closed. This will minimize the number of entrylogs/file descriptors that are open/active and also it will make progress in leastUnflushedLogId, so that GarbageCollectorThread can consider these entrylogs for garbage collection. + +### Proposed Changes + +So in entrylog per ledger feature implementation, as a first step of handling this, expireAfterAccess (each entrylog should be automatically rotated from the current active entrylog list once a fixed duration has elapsed after the last access of entrylog for addEntry) will be implemented and also the maximum number of entrylogs that can be active at a given time (this is for limiting number of entrylogs/filedescriptors open at a given time). Review comment: sure..this is lower level implementation detail. This should be doable/extendable. ---------------------------------------------------------------- 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
