tuteng opened a new pull request #5563: [broker]Add handle exception KeeperException.BadVersionException URL: https://github.com/apache/pulsar/pull/5563 Fixes https://github.com/apache/pulsar/issues/4790 Master Issue: https://github.com/apache/pulsar/issues/4790 ### Motivation Currently, when the brokerDeleteInactiveTopicsEnabled policy is enabled, the topic pulsar/standalone/127.0.0.1:8080/healthcheck will be deleted periodically, when creating producer and consumer for the second time https://github.com/apache/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/BrokersBase.java#L272, because both producer and consumer call putSchema in a short period of time, resulting in race conditions, only one of them could succeed. therefore, when badVersion exception occurs, operation putSchema should be performed again. . Throwing exceptions of schema badVersion. ### Modifications * Add operation to handle exception KeeperException.BadVersionException ### Verifying this change ``` ./bin/pulsar standalone -nss -a 127.0.0.1 curl -v http://127.0.0.1:8080/admin/v2/brokers/health # Waiting for more than 60 seconds, waiting for the topic pulsar/standalone/127.0.0.1:8080/healthcheck to be deleted curl -v http://127.0.0.1:8080/admin/v2/brokers/health ```
---------------------------------------------------------------- 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] With regards, Apache Git Services
