rdhabalia opened a new pull request #9501:
URL: https://github.com/apache/pulsar/pull/9501


   ### Motivation
   Right now, MetadataStore returns `BadVersion` error when node already exists 
instead `AlreadyExists` error-code. There are many usecases which require 
correct error code to handle failures. for example: 
[partitioned-topic](https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java#L291)
 considers `AlreadyExists` error as successful result but instead metadata-api 
returns `BadVersion` error which creates complication while handling failures.
   So, return correct error-code(`AlreadyExists`) if node already exists while 
creating metadata key-placeholder,


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to