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/07/11 00:59:03 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #16492: [improve][cleanup] Keep usage of deprecated configs inside ServiceConfiguration

codelipenghui commented on code in PR #16492:
URL: https://github.com/apache/pulsar/pull/16492#discussion_r917475379


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2779,6 +2781,10 @@ public class ServiceConfiguration implements PulsarConfiguration {
     )
     private Set<String> additionalServlets = new TreeSet<>();
 
+    public boolean isSubscriptionKeySharedEnable() {
+        return subscriptionKeySharedEnable && subscriptionTypesEnabled.contains("Key_Shared");
+    }

Review Comment:
   Here should be a bug fix. If the subscriptionKeySharedEnable = true but the subscriptionTypesEnabled doesn't have the `Key_Shared` subscription, we should treat it as Key_Shared subscription disabled.
   
   https://github.com/apache/pulsar/blob/b68415a89dcd067511d01956447d1a507865534c/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L704-L708
   
   Could you please add a UT?



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