lhotari commented on code in PR #22292:
URL: https://github.com/apache/pulsar/pull/22292#discussion_r1529826613
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java:
##########
@@ -714,10 +712,7 @@ private CompletableFuture<Void>
provisionPartitionedTopicPath(int numPartitions,
}
protected CompletableFuture<SchemaCompatibilityStrategy>
getSchemaCompatibilityStrategyAsync() {
- return validateTopicPolicyOperationAsync(topicName,
- PolicyName.SCHEMA_COMPATIBILITY_STRATEGY,
- PolicyOperation.READ)
- .thenCompose((__) ->
getSchemaCompatibilityStrategyAsyncWithoutAuth()).whenComplete((__, ex) -> {
+ return
getSchemaCompatibilityStrategyAsyncWithoutAuth().whenComplete((__, ex) -> {
Review Comment:
`getSchemaCompatibilityStrategyAsync` and
`getSchemaCompatibilityStrategyAsyncWithoutAuth` contain about the same logic
now.
Please get rid of `getSchemaCompatibilityStrategyAsyncWithoutAuth`.
It seems that replacing `getSchemaCompatibilityStrategyAsyncWithoutAuth`
with `getSchemaCompatibilityStrategyAsync` in
`SchemasResourcesBase.postSchemaAsync` and then inlining
`getSchemaCompatibilityStrategyAsyncWithoutAuth` into
`getSchemaCompatibilityStrategyAsync` would address the problem.
--
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]