wangjialing218 commented on a change in pull request #14903:
URL: https://github.com/apache/pulsar/pull/14903#discussion_r836099445



##########
File path: 
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/impl/ZKMetadataStore.java
##########
@@ -386,7 +386,13 @@ private void internalStorePut(OpPut opPut) {
                                 put(opPut.getPath(), opPut.getData(), 
Optional.of(-1L)).thenAccept(
                                                 s -> future.complete(s))
                                         .exceptionally(ex -> {
-                                            
future.completeExceptionally(MetadataStoreException.wrap(ex.getCause()));
+                                            if (ex instanceof 
BadVersionException) {

Review comment:
       The code here is handling the put request without `expectedVersion`, 
that means the put operation should succeed in case of concurrent write. we 
should not throw BadVersionException here, which means the expected version 
doesn't match the actual version of the data.




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