ningyougang commented on code in PR #5313:
URL: https://github.com/apache/openwhisk/pull/5313#discussion_r950039481


##########
core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala:
##########
@@ -376,34 +376,21 @@ class FPCInvokerReactive(config: WhiskConfig,
   override def enable(): Route = {
     invokerHealthManager ! Enable
     pool ! Enable
-    // re-enable consumer
-    if (consumer.isEmpty)
-      consumer = Some(
-        new ContainerMessageConsumer(
-          instance,
-          pool,
-          entityStore,
-          cfg,
-          msgProvider,
-          longPollDuration = 1.second,
-          maxPeek,
-          sendAckToScheduler))
     warmUp()
     complete("Success enable invoker")
   }
 
   override def disable(): Route = {
     invokerHealthManager ! GracefulShutdown
     pool ! GracefulShutdown
-    consumer.foreach(_.close())
-    consumer = None
     warmUpWatcher.foreach(_.close())
     warmUpWatcher = None
+    consumer.foreach(_.close())

Review Comment:
   Can we remove the logic : `consumer.foreach(_.close())` ?
   
   If added, i think there may exist some message in kafka during zerodowntime 
deployment



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to