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


##########
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:
   @AnonHxy shadowTopics is volatile and it will refers to new array object in 
`onUpdate(TopicPolicies policies)`. So we don't need copy there.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to