Jason918 commented on a change in pull request #13297:
URL: https://github.com/apache/pulsar/pull/13297#discussion_r771045399
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -163,6 +168,7 @@ protected void updateTopicPolicy(TopicPolicies data) {
data.getBackLogQuotaMap() == null ? null :
data.getBackLogQuotaMap().get(type.toString())));
topicPolicies.getTopicMaxMessageSize().updateTopicValue(data.getMaxMessageSize());
topicPolicies.getMessageTTLInSeconds().updateTopicValue(data.getMessageTTLInSeconds());
+
topicPolicies.getSchemaCompatibilityStrategy().updateTopicValue(data.getSchemaCompatibilityStrategy());
Review comment:
The update logic of SchemaCompatibilityStrategy is a bit different from
other policies. SchemaCompatibilityStrategy.UNDEFINED has the same effect with
null value, and System topic has special handling. Please refer to
`setSchemaCompatibilityStrategy`, and make sure this change will keep the
compatibility.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -101,9 +101,9 @@
// Whether messages published must be encrypted or not in this topic
protected volatile boolean isEncryptionRequired = false;
- @Getter
protected volatile SchemaCompatibilityStrategy schemaCompatibilityStrategy
=
Review comment:
This field should not needed any more
##########
File path:
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/TopicPolicies.java
##########
@@ -69,6 +69,8 @@
private Integer maxMessageSize;
private Integer maxSubscriptionsPerTopic;
private DispatchRateImpl replicatorDispatchRate;
+ @Builder.Default
+ private SchemaCompatibilityStrategy schemaCompatibilityStrategy =
SchemaCompatibilityStrategy.FULL;
Review comment:
Topic level policy has the highest priority. IMHO, add a default value
here is not a good idea.
--
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]