wangjialing218 opened a new pull request #14903: URL: https://github.com/apache/pulsar/pull/14903
### Motivation call MetadataStore#put without version by `MetadataStore.put(path, data, Optional.empty())` concurrently with same node may get `BadVersionException` At first the node is not exist, put operation will fail and fall back to create node with `MetadataStore.put(path, data, -1)`. `version=-1` means create the node, and if the node was just created by other thread, it will thow `BadVersionException`. ### Modifications Since original call does not set `version`, `BadVersionException` is not excepted for caller. We could just overwrite the value in this case. ### Documentation Check the box below or label this PR directly (if you have committer privilege). - [x] `no-need-doc` -- 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]
