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/02/01 15:23:30 UTC
[GitHub] [pulsar] Jason918 commented on a change in pull request #14061: [Broker] Adjust the validation for policy schemaCompatibilityStrategy
Jason918 commented on a change in pull request #14061:
URL: https://github.com/apache/pulsar/pull/14061#discussion_r796707314
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -766,39 +768,37 @@ protected void resumeAsyncResponseExceptionally(AsyncResponse asyncResponse, Thr
}
protected CompletableFuture<SchemaCompatibilityStrategy> getSchemaCompatibilityStrategyAsync() {
- return validateTopicOperationAsync(topicName, TopicOperation.GET_SCHEMA_COMPATIBILITY_STRATEGY)
- .thenCompose((__) -> {
- CompletableFuture<SchemaCompatibilityStrategy> future;
- if (config().isTopicLevelPoliciesEnabled()) {
- future = getTopicPoliciesAsyncWithRetry(topicName)
- .thenApply(op -> op.map(TopicPolicies::getSchemaCompatibilityStrategy).orElse(null));
- } else {
- future = CompletableFuture.completedFuture(null);
- }
+ validateTopicPolicyOperation(topicName, PolicyName.SCHEMA_COMPATIBILITY_STRATEGY, PolicyOperation.READ);
Review comment:
https://github.com/apache/pulsar/blob/a0fe8562694013b11910b39ebf4dc703c1400bf4/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java#L1101
This one?
--
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