BewareMyPower commented on code in PR #21187:
URL: https://github.com/apache/pulsar/pull/21187#discussion_r1456918665


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -1017,6 +1021,10 @@ private CompletableFuture<Subscription> 
getDurableSubscription(String subscripti
         }
 
         Map<String, Long> properties = 
PersistentSubscription.getBaseCursorProperties(replicated);
+        if (readCompacted) {
+            properties = new TreeMap<>(properties);
+            properties.put(READ_COMPACTED_CURSOR_PROPERTIES, 1L);

Review Comment:
   Yeah, we can create a new map and copy the elements from the immutable map.



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