### Motivation If function metadata-producer gets disconnected from broker then function-registration admin-api thread gets stuck. ``` sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) - java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Interpreted frame) - java.util.concurrent.CompletableFuture$Signaller.block() @bci=19, line=1693 (Interpreted frame) - java.util.concurrent.ForkJoinPool.managedBlock(java.util.concurrent.ForkJoinPool$ManagedBlocker) @bci=119, line=3323 (Interpreted frame) - java.util.concurrent.CompletableFuture.waitingGet(boolean) @bci=129, line=1729 (Interpreted frame) - java.util.concurrent.CompletableFuture.get() @bci=11, line=1895 (Interpreted frame) - org.apache.pulsar.functions.worker.rest.api.FunctionsImpl.updateRequest(org.apache.pulsar.functions.proto.Function$FunctionMetaData) @bci=18, line=562 (Interpreted frame) - org.apache.pulsar.functions.worker.rest.api.FunctionsImpl.registerFunction(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition, java.lang.String, java.lang.String, java.lang.String) @bci=461, line=190 (Interpreted frame) - org.apache.pulsar.functions.worker.rest.api.v2.FunctionApiV2Resource.registerFunction(java.lang.String, java.lang.String, java.lang.String, java.io.InputStream, org.glassfi ```
### Modifications Complete future on which function-admin-api-thread is waiting if fun-metadata publish fails. ### Result function-worker threads will not stuck while registering function-metadata. [ Full content available at: https://github.com/apache/pulsar/pull/2634 ] This message was relayed via gitbox.apache.org for [email protected]
