You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/12/28 02:13:24 UTC

[GitHub] [bookkeeper] zymap commented on a change in pull request #2966: Add skip remove bookie option for bookkeeper shell recover command

zymap commented on a change in pull request #2966:
URL: https://github.com/apache/bookkeeper/pull/2966#discussion_r775694960



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerRecoveryOp.java
##########
@@ -93,12 +96,17 @@ LedgerRecoveryOp setEntryListener(ReadEntryListener entryListener) {
     }
 
     public CompletableFuture<LedgerHandle> initiate() {
+        return initiate(null);
+    }
+
+    public CompletableFuture<LedgerHandle> initiate(Set<BookieId> skipStatusRemoveBookies) {
+        this.skipStatusRemoveBookies = skipStatusRemoveBookies;
         ReadLastConfirmedOp rlcop = new ReadLastConfirmedOp(clientCtx.getBookieClient(),
-                                                            lh.distributionSchedule,
-                                                            lh.macManager,
-                                                            lh.ledgerId,
-                                                            lh.getCurrentEnsemble(),
-                                                            lh.ledgerKey,
+                lh.distributionSchedule,

Review comment:
       Please avoid formatting code in the PR, that confuses the review.

##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ReadOnlyLedgerHandle.java
##########
@@ -261,13 +265,23 @@ void recover(GenericCallback<Void> finalCb) {
     void recover(GenericCallback<Void> finalCb,
                  final @VisibleForTesting ReadEntryListener listener,
                  final boolean forceRecovery) {
+        recover(finalCb,
+                listener,
+                forceRecovery,
+                null);
+    }
+
+    void recover(GenericCallback<Void> finalCb,
+                 final @VisibleForTesting ReadEntryListener listener,
+                 final boolean forceRecovery,
+                 final Set<BookieId> skipStatusRemoveBookies) {
         final GenericCallback<Void> cb = new TimedGenericCallback<Void>(
-            finalCb,
-            BKException.Code.OK,
-            clientCtx.getClientStats().getRecoverOpLogger());
+                finalCb,

Review comment:
       same above.

##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/PendingReadOp.java
##########
@@ -530,7 +549,7 @@ void initiate() {
             entry.read();
             if (!parallelRead && clientCtx.getConf().readSpeculativeRequestPolicy.isPresent()) {
                 speculativeTask = clientCtx.getConf().readSpeculativeRequestPolicy.get()
-                    .initiateSpeculativeRequest(clientCtx.getScheduler(), entry);
+                        .initiateSpeculativeRequest(clientCtx.getScheduler(), entry);

Review comment:
       same above.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org