poorbarcode commented on code in PR #21246:
URL: https://github.com/apache/pulsar/pull/21246#discussion_r1373413912
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractSubscription.java:
##########
@@ -18,14 +18,37 @@
*/
package org.apache.pulsar.broker.service;
+import org.apache.pulsar.common.api.proto.CommandSubscribe.IsolationLevel;
+
+import java.util.Map;
import java.util.Optional;
import java.util.concurrent.atomic.LongAdder;
import java.util.function.ToLongFunction;
public abstract class AbstractSubscription implements Subscription {
+ protected static final String SUBSCRIPTION_ISOLATION_LEVEL_PROPERTY =
"pulsar.subscription.isolation.level";
protected final LongAdder bytesOutFromRemovedConsumers = new LongAdder();
protected final LongAdder msgOutFromRemovedConsumer = new LongAdder();
+ public static void wrapIsolationLevelToProperties(Map<String, String>
properties, IsolationLevel isolationLevel) {
+ if (properties != null) {
Review Comment:
If the argument `properties` is null, you discarded the prop
`isolationLevel`, it is wrong. please add a test for this case, thanks
--
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]