EMsnap commented on code in PR #18293:
URL: https://github.com/apache/pulsar/pull/18293#discussion_r1011292588


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/schema/SchemaRegistryServiceImpl.java:
##########
@@ -219,7 +221,13 @@ public CompletableFuture<SchemaVersion> 
putSchemaIfAbsent(String schemaId, Schem
                         .whenComplete((__, t) -> {
                             if (t != null) {
                                 log.error("[{}] Put schema failed", schemaId);
-                                this.stats.recordPutFailed(schemaId);
+                                if (t.getCause() instanceof 
AlreadyExistsException
+                                        || t.getCause() instanceof 
BadVersionException) {
+                                    // retry if put schemaLocator ot zk failed 
caused by race condition

Review Comment:
   put locator to 



-- 
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]

Reply via email to