jerrypeng opened a new pull request #7509: URL: https://github.com/apache/pulsar/pull/7509
### Motivation Wait under worker is done with becoming leader routine before performing operations like updateFunctionOnLeader. If we don't, a deadlock can happen : Jetty - Create Request -> updateOnLeader (synchronized on FunctionMetadataManger) -> publish to metadata topic -> waitLeaderInit - > wait on tailer thread to close() tailer thread -reads from metadata topic -> process update (synchronized on FunctionMetadataManger) ---------------------------------------------------------------- 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: us...@infra.apache.org