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 2021/09/15 03:21:39 UTC

[GitHub] [pulsar] wuzhanpeng commented on a change in pull request #8992: PIP-68: WaitForExclusive producer access mode

wuzhanpeng commented on a change in pull request #8992:
URL: https://github.com/apache/pulsar/pull/8992#discussion_r708806589



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -337,14 +342,15 @@ public String getReplicatorPrefix() {
     }
 
     @Override
-    public CompletableFuture<Optional<Long>> addProducer(Producer producer) {
+    public CompletableFuture<Optional<Long>> addProducer(Producer producer,
+            CompletableFuture<Void> producerQueuedFuture) {
         checkArgument(producer.getTopic() == this);
 
         CompletableFuture<Optional<Long>> future = new CompletableFuture<>();
 
-        incrementTopicEpochIfNeeded(producer)
-                .thenAccept(epoch -> {
-                    lock.readLock().lock();

Review comment:
       Hi @merlimat @sijie , this place makes me a little puzzled and I would like to ask why we need to change readlock to writelock?




-- 
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