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/09/06 14:00:25 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #17371: [feat][broker]PIP-180 ShadowTopic - Part IV - Add Shadow Replicator

Jason918 commented on code in PR #17371:
URL: https://github.com/apache/pulsar/pull/17371#discussion_r963747272


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1423,6 +1439,38 @@ public CompletableFuture<Void> checkReplication() {
             }
         });
 
+        futures.add(checkShadowReplication());
+
+        return FutureUtil.waitForAll(futures);
+    }
+
+    private CompletableFuture<Void> checkShadowReplication() {
+        if (CollectionUtils.isEmpty(shadowTopics)) {
+            return CompletableFuture.completedFuture(null);
+        }
+        List<String> configuredShadowTopics = shadowTopics;

Review Comment:
   `shadowTopics` can be updated concurrently. We just need to handle the snapshot of the value.



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