ivankelly commented on a change in pull request #641: Issue-596 Issue-583: Auto replication should honor ensemble placement policy URL: https://github.com/apache/bookkeeper/pull/641#discussion_r145543784
########## File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java ########## @@ -863,16 +857,81 @@ public void openComplete(int newrc, final LedgerHandle newlh, Object newctx) { * @param ledgerFragmentMcb * - MultiCallback to invoke once we've recovered the current * ledger fragment. - * @param newBookie - * - New bookie we want to use to recover and replicate the + * @param newBookies + * - New bookies we want to use to recover and replicate the * ledger entries that were stored on the failed bookie. */ private void asyncRecoverLedgerFragment(final LedgerHandle lh, final LedgerFragment ledgerFragment, final AsyncCallback.VoidCallback ledgerFragmentMcb, - final BookieSocketAddress newBookie) - throws InterruptedException { - lfr.replicate(lh, ledgerFragment, ledgerFragmentMcb, newBookie); + final Set<BookieSocketAddress> newBookies) throws InterruptedException { + lfr.replicate(lh, ledgerFragment, ledgerFragmentMcb, newBookies); + } + + private Map<Integer, BookieSocketAddress> getReplacedBookies( Review comment: Longterm, I think we should stop mutating the ensembles like this. The ensemble for a segment is the ensemble of bookies that "vote" on an entry. It should be immutable. When we rereplicate, we should add another field to the metadata for "extraReplicas", and we can then merge on the read. This would simplify a lot of the recovery logic around ensemble changes. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services