eolivelli commented on issue #671: WIP - BP-14 Relax Durability - patch 2 - force() API for FORCE_DEFERRED_ON_JOURNAL LedgerType URL: https://github.com/apache/bookkeeper/pull/671#issuecomment-340004891 @sijie @ivankelly Actually the problem is about the recovery of the "LastAddSynced" cursor upon bookie restart. If the bookie restarts and there is no journal file to process (because a checkpoint happened for instance and all data went to LedgerStorage), scanning the journal will be no-op and so the local position of LastAddSynced for a given ledger is lost. I tried to use the LastAddConfirmed stored on LedgerStorage and if we piggy-back the lastLastSynced on AddResponse this works partially as the client is able to advance LAC and this LAC gets stored on the bookie. This implementation was also buggy and not correct because it is possible to lose LastSync if no piggy back occours (such piggy back is only an non deterministic optimization). In the very first implementation (some months ago) on the ForceRequest the client was sending the LastAddPushed entryId to the bookie, supposing that the bookie would answer with that value because if the bookies forces sync on the journal the client could assume that every entry before LastAddPushed would have been persisted. This was not correct too I know (see WriteAdvHandle or out of order responses). I am thinking about asking to the LedgerStorage the max(id) of the entries stored locally on the bookie. Another option would be to write on the journal the max(id) of entries written to the disk while flushing the meta 'force' entry. I tried an implementation but it would be very tricky and I did not get to a solution actually
---------------------------------------------------------------- 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
