----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3472/#review5324 -----------------------------------------------------------
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java <https://reviews.apache.org/r/3472/#comment11620> I don't think going up to lastAddConfirmed + 1 is enough. lastAddConfirmed can trail behind the last written entry by an undefined amount. For example, if we asyncAdd 10 entries, they will each have the same lastAddConfirmed in the packet if the 10th is sent before the 1st is acknowledged. The main problem is that bookie recovery reads each entry in parallel, while for this last bit, we need to read sequentially. I think after each ledger fragment successfully completes, this should kick off another operation, which steps up from lastAddConfirmed until it gets NoSuchEntry. - Ivan On 2012-02-24 17:09:54, Sijie Guo wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/3472/ > ----------------------------------------------------------- > > (Updated 2012-02-24 17:09:54) > > > Review request for bookkeeper. > > > Summary > ------- > > Bookie recovery updates the ledger metadata in zookeeper. LedgerHandle will > not get notified of this update, so it will try to write out its own ledger > metadata, only to fail with KeeperException.BadVersion. This effectively > fences all write operations on the LedgerHandle (close and addEntry). close > will fail for obvious reasons. addEntry will fail once it gets to the failed > bookie in the schedule, tries to write, fails, selects a new bookie and tries > to update ledger metadata. > > Update Line 605, testSyncBookieRecoveryToRandomBookiesCheckForDupes(), when > done > Also, uncomment addEntry in > TestFencing#testFencingInteractionWithBookieRecovery() > > > This addresses bug BOOKKEEPER-112. > https://issues.apache.org/jira/browse/BOOKKEEPER-112 > > > Diffs > ----- > > > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java > 37623dc > > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java > a94a0e5 > > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerMetadata.java > b403aa1 > > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java > c67a79c > > bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java > 29070eb > > bookkeeper-server/src/test/java/org/apache/bookkeeper/client/BookieRecoveryTest.java > 99258ac > > bookkeeper-server/src/test/java/org/apache/bookkeeper/client/TestFencing.java > 015e4e4 > > bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BaseTestCase.java > dada67a > > Diff: https://reviews.apache.org/r/3472/diff > > > Testing > ------- > > > Thanks, > > Sijie > >
