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/03/28 05:53:11 UTC

[GitHub] [pulsar] gaozhangmin commented on a change in pull request #14903: fix MetadataStore#put may get unexcepted exception

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



##########
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:
       BadVersion exception happened with concurrent write to same ZNODE.  I think it's ok when some writer failed with BadVersionException because of competing failed. @wangjialing218 




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