jerrypeng commented on a change in pull request #7255: URL: https://github.com/apache/pulsar/pull/7255#discussion_r443731162
########## File path: pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataManager.java ########## @@ -90,25 +79,25 @@ public FunctionMetaDataManager(WorkerConfig workerConfig, */ public void initialize() { try { + initializeTailer(); this.functionMetaDataTopicTailer = new FunctionMetaDataTopicTailer(this, pulsarClient.newReader(), this.workerConfig, this.errorNotifier); // read all existing messages - this.setInitializePhase(true); while (this.functionMetaDataTopicTailer.getReader().hasMessageAvailable()) { this.functionMetaDataTopicTailer.processRequest(this.functionMetaDataTopicTailer.getReader().readNext()); } - this.setInitializePhase(false); - - } catch (Exception e) { log.error("Failed to initialize meta data store", e); - throw new RuntimeException(e); + errorNotifier.triggerError(e); } } - + + private void initializeTailer() throws PulsarClientException { Review comment: Should we separate out the metadata tailer from the meta manager like what we did for the assignment tailer and runtime manager? ---------------------------------------------------------------- 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