jerrypeng commented on a change in pull request #7509: URL: https://github.com/apache/pulsar/pull/7509#discussion_r453341001
########## File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java ########## @@ -686,10 +686,33 @@ public void updateFunctionOnWorkerLeader(final String tenant, } // Redirect if we are not the leader + boolean shouldRedirect = false; if (!worker().getLeaderService().isLeader()) { WorkerInfo workerInfo = worker().getMembershipManager().getLeader(); - URI redirect = UriBuilder.fromUri(uri).host(workerInfo.getWorkerHostname()).port(workerInfo.getPort()).build(); - throw new WebApplicationException(Response.temporaryRedirect(redirect).build()); + // there might be a delay between when the leader service for this worker gets triggered "becomeActive" Review comment: I would rather minimize the number of errors we return to the user ---------------------------------------------------------------- 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