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 2020/03/19 17:39:54 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #6560: Fix: topic with one partition cannot be updated

jerrypeng commented on a change in pull request #6560: Fix: topic with one partition cannot be updated
URL: https://github.com/apache/pulsar/pull/6560#discussion_r395206029
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
 ##########
 @@ -2162,11 +2162,6 @@ private PersistentReplicator getReplicatorReference(String replName, PersistentT
         String path = path(PARTITIONED_TOPIC_PATH_ZNODE, topicName.getPersistenceNamingEncoding());
         CompletableFuture<Void> result = new CompletableFuture<>();
         pulsar().getBrokerService().fetchPartitionedTopicMetadataAsync(topicName).thenAccept(partitionMetadata -> {
-            if (partitionMetadata.partitions <= 1) {
 
 Review comment:
   partitionMetadata is the current metadata for the topic.  If we check "< 1" that would be saying for any topic that has greater than one partition, it cannot be updated and the exception will be returned.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services