yuruguo commented on a change in pull request #14061:
URL: https://github.com/apache/pulsar/pull/14061#discussion_r795396222
##########
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:
I found that pulsar does not provide async method
`validateTopicPolicyOperationAsync`, maybe we should add this method and
replace all synchronous method `validateTopicPolicyOperation`.
--
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]