ArvinDevel commented on a change in pull request #925: Issue611: restrict max
ensemble change numbers
URL: https://github.com/apache/bookkeeper/pull/925#discussion_r163440871
##########
File path:
bookkeeper-server/src/test/java/org/apache/bookkeeper/client/api/BookKeeperBuildersTest.java
##########
@@ -340,8 +337,12 @@ public void testOpenLedgerNoRecovery() throws Exception {
ledgerMetadata.getEnsembles().values().forEach(bookieAddressList -> {
bookieAddressList.forEach(bookieAddress -> {
- registerMockEntryForRead(ledgerId,
BookieProtocol.LAST_ADD_CONFIRMED, bookieAddress, entryData, -1);
- registerMockEntryForRead(ledgerId, 0, bookieAddress,
entryData, -1);
+ try {
+ registerMockEntryForRead(ledgerId,
BookieProtocol.LAST_ADD_CONFIRMED, bookieAddress, entryData, -1);
+ registerMockEntryForRead(ledgerId, 0, bookieAddress,
entryData, -1);
Review comment:
good idea. when the bookie is down, the write to it will throw
NoBookieAvalibleException to trigger ensemble change. I tried @sneakythrows,
but fail. I can't add @sneakythrows in `registerMockEntryForRead`, because the
exception is needed to response failure to request. I failed to add
@sneakythrows(...BKException) on methods who call registerMockEntryForRead(such
as `testOpenLedgerRecovery`), which causes compile error, "must be caught ...",
although it should be compiled with no error.
----------------------------------------------------------------
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