You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/29 04:22:29 UTC

[GitHub] [pulsar] RobertIndie commented on a change in pull request #14887: [feature][admin] Support reset cluster replicator cursor

RobertIndie commented on a change in pull request #14887:
URL: https://github.com/apache/pulsar/pull/14887#discussion_r837004332



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -2278,89 +2279,60 @@ private void internalCreateSubscriptionForNonPartitionedTopic(
         });
     }
 
-    protected void internalResetCursorOnPosition(AsyncResponse asyncResponse, String subName, boolean authoritative,
+    protected CompletableFuture<Void> internalResetCursorOnPosition(String name, boolean authoritative,

Review comment:
       Why change `subName` to `name` here?

##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentReplicator.java
##########
@@ -771,10 +784,55 @@ public boolean isConnected() {
         return producer != null && producer.isConnected();
     }
 
+    @Override
+    public CompletableFuture<Void> resetCursor(Position position) {
+        CURSOR_RESETTING_UPDATER.set(this, TRUE);

Review comment:
       Is there a race condition here when multiple threads call this method concurrently?




-- 
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: commits-unsubscribe@pulsar.apache.org

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