You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2021/06/08 08:54:06 UTC
[GitHub] [openwhisk] ningyougang opened a new pull request #5125: [New Scheduler] Implement FPCInvokerReactive
ningyougang opened a new pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125
<!--- Provide a concise summary of your changes in the Title -->
## Description
<!--- Provide a detailed description of your changes. -->
<!--- Include details of what problem you are solving and how your changes are tested. -->
This component is for `initialize the invoker side's components when invoker starts up`, can replace current InvokerReactive and use FPCInvokerReactive here: https://github.com/apache/openwhisk/blob/master/common/scala/src/main/resources/reference.conf#L29
## Related issue and scope
<!--- Please include a link to a related issue if there is one. -->
- [ ] I opened an issue to propose and discuss this change (#????)
## My changes affect the following components
<!--- Select below all system components are affected by your change. -->
<!--- Enter an `x` in all applicable boxes. -->
- [ ] API
- [ ] Controller
- [ ] Message Bus (e.g., Kafka)
- [ ] Loadbalancer
- [ ] Scheduler
- [x] Invoker
- [ ] Intrinsic actions (e.g., sequences, conductors)
- [ ] Data stores (e.g., CouchDB)
- [ ] Tests
- [ ] Deployment
- [ ] CLI
- [ ] General tooling
- [ ] Documentation
## Types of changes
<!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
- [ ] Bug fix (generally a non-breaking change which closes an issue).
- [x] Enhancement or new feature (adds new functionality).
- [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
## Checklist:
<!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
- [x] I signed an [Apache CLA](https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md).
- [x] I reviewed the [style guides](https://github.com/apache/openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
- [ ] I added tests to cover my changes.
- [ ] My changes require further changes to the documentation.
- [ ] I updated the documentation where necessary.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698214622
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(50.milliseconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647260192
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
Review comment:
`warmedContainerKeepingCount, warmedContainerKeepingTimeout` is for `avoid cold start`: doesn't remove one namespace's all warmed containers when FunctionPullingContainerProxy timeout happens, need to keep the right amount warmed containers running for warmedContainerKeepingTimeout time.
After wait some long time and invocation happens, have no need to create a container, just uses the non-deleted warmed container.
for a specified namespace, we can configure `the warmedContainerKeepingCount, warmedContainerKeepingTimeout` in subjects's limit doucment, e.g.

If doesn't configure `warmedContainerKeepingCount, warmedContainerKeepingTimeout` in couchdb, it will use default configuration (warmedContainerKeepingCount: 1, warmedContainerKeepingTimeout: "60 minutes")
--
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:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-1011897082
LGTM
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698232482
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/ack/HealthActionAck.scala
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.ack
+
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, MessageProducer}
+import org.apache.openwhisk.core.entity.{ControllerInstanceId, UUID, WhiskActivation}
+import spray.json.DefaultJsonProtocol._
+
+import scala.concurrent.{ExecutionContext, Future}
+
+class HealthActionAck(producer: MessageProducer)(implicit logging: Logging, ec: ExecutionContext) extends ActiveAck {
+ override def apply(tid: TransactionId,
+ activationResult: WhiskActivation,
+ blockingInvoke: Boolean,
+ controllerInstance: ControllerInstanceId,
+ userId: UUID,
+ acknowledegment: AcknowledegmentMessage): Future[Any] = {
+ implicit val transid: TransactionId = tid
+
+ logging.debug(this, s"health action is successfully invoked")
Review comment:
Updated accordingly.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r652274887
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
@bdoyle0182 ,thanks for you review, just add 2 fields to `case class UserLimits`, it is not `a large architectural change`
--
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:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r712399262
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
Review comment:
I'm not sure what the best way would be to refactor this, but including a `var` in an `Object` is bad.
http://www.tzavellas.com/techblog/2010/09/20/var-singleton-objects/
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db and it is for `namespace`, one namespace's all actions complete for this `keepingCount` value. Only frequent invocation actions under that namepsace can have this value.
So my opinion is, in spite of infect the non-scheduler code, it is better to add above 2 fields to `case class UserLimits`,
anyway, the non-scheduler codes can run well in spite of infect the codes.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698224416
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
Review comment:
Regarding `get into situations where one function starves all of the warm containers kept for that namespace right?`
Let's assume warmedContainerKeepCount is `2`, and same namespace has 4 actions (e.g. actionA, actionB, actionC, actionD)
Normally, these 4 actions will complete for `warmedContainerKeepCount: 2`,
* if 1 or 2 actions are executed actions frequently with medium tps
these actions's 2 warmed containers will keep `warmedContainerkeepingTimeout` before removed even if no activations comes anymore.
* if > 2 actions are executed actions frequently with medium tps
Just satisfy 2 actions's exist non-removed containers, another 2 actions should do `cold start`, for this situation, use can configure warmedContainerKeepCount with a little bigger value, decide by user.
* big tps for actionA
It seems actionA will use all `warmedContainerKeepCount : 2` warmed container, other actions(e.g. actionB, actionC, actionD) will do `cold start`, seems have no method to solve this, due to even if we configure a little bigger value, actionA will use all due to actionA's tps is big.
Currently, we just configure it for namespace not for ` individual functions`
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time(don't read from db, just from configuration file only),
and submit the changes(e.g. add above 2 fileds) with another subsequent pr.
hm..but obviously, configure it in db is a better solution.
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time(don't read from db, just from configuration file only),
and submit the changes(e.g. add above 2 fileds) with another subsequent pr maybe.
hm..but obviously, configure it in db is a better solution.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f75b616) into [master](https://codecov.io/gh/apache/openwhisk/commit/cf36299d5ee45aa014ec84326d3a69f5b2df446c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf36299) will **increase** coverage by `47.58%`.
> The diff coverage is `1.30%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 26.10% 73.69% +47.58%
===========================================
Files 227 236 +9
Lines 13118 13611 +493
Branches 537 566 +29
===========================================
+ Hits 3424 10030 +6606
+ Misses 9694 3581 -6113
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `78.63% <0.00%> (+13.79%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `95.41% <ø> (+26.60%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `69.35% <ø> (ø)` | |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `58.11% <0.00%> (-0.51%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.70% <100.00%> (+0.05%)` | :arrow_up: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...whisk/connector/kafka/KafkaConsumerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYUNvbnN1bWVyQ29ubmVjdG9yLnNjYWxh) | `59.15% <0.00%> (-22.54%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/utils/Exceptions.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3V0aWxzL0V4Y2VwdGlvbnMuc2NhbGE=) | `20.00% <0.00%> (-20.00%)` | :arrow_down: |
| ... and [167 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf36299...f75b616](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r783688077
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
Review comment:
@bdoyle0182 ,sorry, have no time to care about this. i removed that var due to `have no need for that var`
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5acd88) into [master](https://codecov.io/gh/apache/openwhisk/commit/96330437d63b5291a020d8a2ba1b401f2cc84ab5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9633043) will **decrease** coverage by `41.02%`.
> The diff coverage is `0.87%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
==========================================
- Coverage 45.64% 4.62% -41.03%
==========================================
Files 234 236 +2
Lines 13389 13616 +227
Branches 551 571 +20
==========================================
- Hits 6112 630 -5482
- Misses 7277 12986 +5709
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `40.90% <0.00%> (-34.44%)` | :arrow_down: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `0.00% <0.00%> (-93.34%)` | :arrow_down: |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `0.00% <ø> (-76.38%)` | :arrow_down: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `0.00% <ø> (-69.36%)` | :arrow_down: |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (-79.32%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `66.25% <100.00%> (-29.40%)` | :arrow_down: |
| [...ain/scala/org/apache/openwhisk/spi/SpiLoader.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3NwaS9TcGlMb2FkZXIuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...scala/org/apache/openwhisk/core/FeatureFlags.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvRmVhdHVyZUZsYWdzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [123 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9633043...a5acd88](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f75b616) into [master](https://codecov.io/gh/apache/openwhisk/commit/cf36299d5ee45aa014ec84326d3a69f5b2df446c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf36299) will **increase** coverage by `37.00%`.
> The diff coverage is `1.30%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 26.10% 63.10% +37.00%
===========================================
Files 227 236 +9
Lines 13118 13611 +493
Branches 537 566 +29
===========================================
+ Hits 3424 8589 +5165
+ Misses 9694 5022 -4672
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `68.18% <0.00%> (+3.34%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `94.49% <ø> (+25.68%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `4.83% <ø> (-64.52%)` | :arrow_down: |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (-58.63%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `93.86% <100.00%> (-1.79%)` | :arrow_down: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...che/openwhisk/core/invoker/LogStoreCollector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9Mb2dTdG9yZUNvbGxlY3Rvci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...a/org/apache/openwhisk/http/BasicHttpService.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2h0dHAvQmFzaWNIdHRwU2VydmljZS5zY2FsYQ==) | `3.17% <0.00%> (-87.31%)` | :arrow_down: |
| ... and [171 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf36299...f75b616](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647265553
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala
##########
@@ -1440,10 +1440,7 @@ class FunctionPullingContainerProxyTests
Some(instanceId),
Some(testContainerId)),
""))
- inAnyOrder {
- probe.expectMsg(Transition(machine, Paused, Running))
- probe.expectMsgType[Resumed]
- }
+ probe.expectMsgAllClassOf(Transition(machine, Paused, Running).getClass, classOf[Resumed])
Review comment:
Make the corresponding test case more stable here.
There is no constraint on ordering for messages `Transition(machine, Paused, Running)` and `the Resumed(warmedData)`,
Previous `inAnyOrder` doesn't work here due to `probe is not a mock object`(document: https://www.scalatest.org/user_guide/testing_with_mock_objects)
Another option is ` use probe.expectMsgAllof`, but it is not easy to get(or create) the `Resumed(WarmedData)` object,
So i used `expectMsgAllClassOf`, but it seems it is not good here.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r651456666
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
@bdoyle0182 @style95 ,due to above 2 fields(warmedContainerKeepingCount, warmedContainerKeepingTimeout) are added into `case class UserLimits`, do you guys have any opinion?
--
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:
users@infra.apache.org
[GitHub] [openwhisk] jiangpengcheng commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
jiangpengcheng commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648921488
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
maybe have infects for non-scheduler codes?
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang closed pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang closed pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698232599
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
+ }
+ .andThen {
+ case Failure(_: NoDocumentException) =>
+ logging.warn(this, s"namespace does not exist: $invocationNamespace")(trasnid)
+ case Failure(_: IllegalStateException) =>
+ logging.warn(this, s"namespace is not unique: $invocationNamespace")(trasnid)
+ }
+ }
+
+ private val ack = {
+ val sender = if (UserEvents.enabled) Some(new UserEventSender(producer)) else None
+ new MessagingActiveAck(producer, instance, sender)
+ }
+
+ // we don't need to store health action results in normal case
+ private val healthActionAck: ActiveAck = new HealthActionAck(producer)
+
+ private val collectLogs = new LogStoreCollector(logsProvider)
+
+ /** Stores an activation in the database. */
+ private val store = (tid: TransactionId, activation: WhiskActivation, isBlocking: Boolean, context: UserContext) => {
+ implicit val transid: TransactionId = tid
+ activationStore.storeAfterCheck(activation, isBlocking, None, context)(tid, notifier = None, logging)
+ }
+
+ private def healthActivationClientFactory(f: ActorRefFactory,
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ rev: DocRevision,
+ schedulerHost: String,
+ rpcPort: Int,
+ containerId: ContainerId): ActorRef =
+ f.actorOf(Props(HealthActivationServiceClient()))
+
+ private def healthContainerProxyFactory(f: ActorRefFactory, healthManger: ActorRef): ActorRef = {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ FunctionPullingContainerProxy
+ .props(
+ containerFactory.createContainer,
+ entityStore,
+ namespaceBlacklist,
+ WhiskAction.get,
+ dataManagementService,
+ healthActivationClientFactory,
+ healthActionAck,
+ store,
+ collectLogs,
+ getLiveContainerCount,
+ getWarmedContainerLimit,
+ instance,
+ healthManger,
+ poolConfig,
+ containerProxyTimeoutConfig))
+ }
+
+ private val invokerHealthManager =
+ actorSystem.actorOf(
+ InvokerHealthManager.props(instance, healthContainerProxyFactory, dataManagementService, entityStore))
+ FPCInvokerReactive.invokerHealthManagerActor = Some(invokerHealthManager)
+ invokerHealthManager ! Enable
+
+ private def activationClientFactory(etcd: EtcdClient)(
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ schedulerHost: String,
+ rpcPort: Int,
+ tryOtherScheduler: Boolean = false): Future[ActivationServiceClient] = {
+
+ if (!tryOtherScheduler) {
+ val setting =
+ GrpcClientSettings
+ .connectToServiceAt(schedulerHost, rpcPort)
+ .withTls(grpcConfig.tls)
+ Future {
+ ActivationServiceClient(setting)
+ }.andThen {
+ case Failure(t) =>
+ logging.error(
+ this,
+ s"unable to create activation client for action ${fqn}: ${t} on original scheduler: ${schedulerHost}:${rpcPort}")
+ }
+ } else {
+ val leaderKey = queue(invocationNamespace, fqn, leader = true)
+ etcd
+ .get(leaderKey)
+ .flatMap { res =>
+ require(!res.getKvsList.isEmpty)
+
+ val endpoint: String = res.getKvsList.get(0).getValue
+ Future(SchedulerEndpoints.parse(endpoint))
+ .flatMap(Future.fromTry)
+ .map { schedulerEndpoint =>
+ val setting =
+ GrpcClientSettings
+ .connectToServiceAt(schedulerEndpoint.host, schedulerEndpoint.rpcPort)
+ .withTls(grpcConfig.tls)
+
+ ActivationServiceClient(setting)
+ }
+ .andThen {
+ case Failure(t) =>
+ logging.error(this, s"unable to create activation client for action ${fqn}: ${t}")
+ }
+ }
+ }
+
+ }
+
+ private def sendAckToScheduler(schedulerInstanceId: SchedulerInstanceId,
+ creationAckMessage: ContainerCreationAckMessage): Future[RecordMetadata] = {
+ val topic = s"${Invoker.topicPrefix}creationAck${schedulerInstanceId.asString}"
+ val reschedulable =
+ creationAckMessage.error.map(ContainerCreationError.whiskErrors.contains(_)).getOrElse(false)
+ if (reschedulable) {
+ MetricEmitter.emitCounterMetric(
+ LoggingMarkers.INVOKER_CONTAINER_CREATE(creationAckMessage.action.toString, "reschedule"))
+ } else if (creationAckMessage.error.nonEmpty) {
+ MetricEmitter.emitCounterMetric(
+ LoggingMarkers.INVOKER_CONTAINER_CREATE(creationAckMessage.action.toString, "failed"))
+ }
+
+ producer.send(topic, creationAckMessage).andThen {
+ case Success(_) =>
+ logging.info(
+ this,
+ s"Posted ${if (reschedulable) "rescheduling"
+ else if (creationAckMessage.error.nonEmpty) "failed"
+ else "success"} ack of container creation ${creationAckMessage.creationId} for ${creationAckMessage.invocationNamespace}/${creationAckMessage.action}")
+ case Failure(t) =>
+ logging.error(
+ this,
+ s"failed to send container creation ack message(${creationAckMessage.creationId}) for ${creationAckMessage.invocationNamespace}/${creationAckMessage.action} to scheduler: ${t.getMessage}")
+ }
+ }
+
+ /** Creates a ContainerProxy Actor when being called. */
+ private val childFactory = (f: ActorRefFactory) => {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ FunctionPullingContainerProxy
+ .props(
+ containerFactory.createContainer,
+ entityStore,
+ namespaceBlacklist,
+ WhiskAction.get,
+ dataManagementService,
+ clientProxyFactory,
+ ack,
+ store,
+ collectLogs,
+ getLiveContainerCount,
+ getWarmedContainerLimit,
+ instance,
+ invokerHealthManager,
+ poolConfig,
+ containerProxyTimeoutConfig))
+ }
+
+ /** Creates a ActivationClientProxy Actor when being called. */
+ private def clientProxyFactory(f: ActorRefFactory,
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ rev: DocRevision,
+ schedulerHost: String,
+ rpcPort: Int,
+ containerId: ContainerId): ActorRef = {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ ActivationClientProxy
+ .props(invocationNamespace, fqn, rev, schedulerHost, rpcPort, containerId, activationClientFactory(etcdClient)))
+ }
+
+ val prewarmingConfigs: List[PrewarmingConfig] = {
+ ExecManifest.runtimesManifest.stemcells.flatMap {
+ case (mf, cells) =>
+ cells.map { cell =>
+ PrewarmingConfig(cell.initialCount, new CodeExecAsString(mf, "", None), cell.memory)
+ }
+ }.toList
+ }
+
+ private val pool =
+ actorSystem.actorOf(
+ ContainerPoolV2
+ .props(childFactory, invokerHealthManager, poolConfig, instance, prewarmingConfigs, sendAckToScheduler))
+
+ private def getLiveContainerCount(invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ revision: DocRevision): Future[Long] = {
+ val namespacePrefix = containerPrefix(ContainerKeys.namespacePrefix, invocationNamespace, fqn, Some(revision))
+ val inProgressPrefix = containerPrefix(ContainerKeys.inProgressPrefix, invocationNamespace, fqn, Some(revision))
+ val warmedPrefix = containerPrefix(ContainerKeys.warmedPrefix, invocationNamespace, fqn, Some(revision))
+ for {
+ namespaceCount <- etcdClient.getCount(namespacePrefix)
+ inProgressCount <- etcdClient.getCount(inProgressPrefix)
+ warmedCount <- etcdClient.getCount(warmedPrefix)
+ } yield {
+ namespaceCount + inProgressCount + warmedCount
+ }
+ }
+
+ /** Initialize message consumers */
+ private val msgProvider = SpiLoader.get[MessagingProvider]
+ //number of peeked messages - increasing the concurrentPeekFactor improves concurrent usage, but adds risk for message loss in case of crash
+ private val maxPeek = loadConfigOrThrow[Int](ConfigKeys.containerCreationMaxPeek)
+ private var consumer: Option[ContainerMessageConsumer] = Some(
+ new ContainerMessageConsumer(
+ instance,
+ pool,
+ entityStore,
+ cfg,
+ msgProvider,
+ longPollDuration = 1.second,
+ maxPeek,
+ sendAckToScheduler))
+
+ 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
+ complete("Success disable invoker")
Review comment:
Updated accordingly
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647260192
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
Review comment:
`warmedContainerKeepingCount, warmedContainerKeepingTimeout` is for `avoid cold start`, doesn't remove one namespace's all warmed containers when container timeout happens, keeps the right amount warmed containers running for some time, when invocation happens next time, have no need to create a container, just uses the non-deleted warmed container.
for a specified namespace, we can configure the warmedContainerKeepingCount, warmedContainerKeepingTimeout in subjects's limit doucment, e.g.

If doesn't configure `warmedContainerKeepingCount, warmedContainerKeepingTimeout` in couchdb, it will use default configuration (warmedContainerKeepingCount: 1, warmedContainerKeepingTimeout: "60 minutes")
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds both, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db, because these 2 value is for `namespace`, so one namespace's all actions complete for this `keepingCount` value.
So my opinion is, in spite of infect the non-scheduler code, it is better to add above 2 fields to `case class UserLimits`,
anyway, the non-scheduler codes can run well in spite of infect the codes.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r652142899
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
I'm not opposed to infecting non-scheduler code where absolutely necessary. I think it's unreasonable to suggest we can make such a large architectural change without touching existing code at all. So long as we're avoiding a breaking change I see no issue with this
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time(don't read from db),
and submit the changes(e.g. add above 2 fileds) with another subsequent pr.
hm..but obviously, configure it in db is a better solution.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-866523828
Have any comment?
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698214622
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(e.g. 50.milliseconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(e.g. 50.milliseconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout` after `idleTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r652143507
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
@ningyougang @style95 also sorry haven't had time to dedicate to the scheduler recently, but will review the remaining existing pr's this week
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698232964
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
Review comment:
What's you mean? move `var invokerHealthManagerActor` to other place?
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time(don't read from db, just from configuration file only),
and submit the changes(e.g. add above 2 fileds) with another subsequent pr maybe.
hm..but obviously, configure it in db is a better solution due to it is for namespace.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698214622
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(e.g. 10.seconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647265553
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala
##########
@@ -1440,10 +1440,7 @@ class FunctionPullingContainerProxyTests
Some(instanceId),
Some(testContainerId)),
""))
- inAnyOrder {
- probe.expectMsg(Transition(machine, Paused, Running))
- probe.expectMsgType[Resumed]
- }
+ probe.expectMsgAllClassOf(Transition(machine, Paused, Running).getClass, classOf[Resumed])
Review comment:
~~Make the corresponding test case more stable here.~~
~~There is no constraint on ordering for messages `Transition(machine, Paused, Running)` and `the Resumed(warmedData)`,~~
~~Previous `inAnyOrder` doesn't work here due to `probe is not a mock object`(document: https://www.scalatest.org/user_guide/testing_with_mock_objects)~~
~~Another option is ` use probe.expectMsgAllof`, but it is not easy to get(or create) the `Resumed(WarmedData)` object,So i used `expectMsgAllClassOf`, but it seems it is not good here.~~
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang merged pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang merged pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r657463373
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/ack/HealthActionAck.scala
##########
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.ack
+
+import org.apache.openwhisk.common.{Logging, TransactionId}
+import org.apache.openwhisk.core.connector.{AcknowledegmentMessage, MessageProducer}
+import org.apache.openwhisk.core.entity.{ControllerInstanceId, UUID, WhiskActivation}
+import spray.json.DefaultJsonProtocol._
+
+import scala.concurrent.{ExecutionContext, Future}
+
+class HealthActionAck(producer: MessageProducer)(implicit logging: Logging, ec: ExecutionContext) extends ActiveAck {
+ override def apply(tid: TransactionId,
+ activationResult: WhiskActivation,
+ blockingInvoke: Boolean,
+ controllerInstance: ControllerInstanceId,
+ userId: UUID,
+ acknowledegment: AcknowledegmentMessage): Future[Any] = {
+ implicit val transid: TransactionId = tid
+
+ logging.debug(this, s"health action is successfully invoked")
Review comment:
This debug shouldn't happen if the health action wasn't succesfully invoked right? Should check response value before logging.
nit: `health action was successfully invoked`
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
Review comment:
This is global mutable state setting a var inside a singleton object. We should refactor this so this value can not be mutated and gets it from a private location where it can be mutated by what should have control over it.
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yea I just meant the entire new scheduler is `a large architectural change` so it's unreasonable to say we can't ever touch other components while implementing. We should avoid where possible, but it will be necessary in a couple situations like this one.
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
Review comment:
how does this work for individual functions? If it's by namespace you can get into situations where one function starves all of the warm containers kept for that namespace right?
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
+ }
+ .andThen {
+ case Failure(_: NoDocumentException) =>
+ logging.warn(this, s"namespace does not exist: $invocationNamespace")(trasnid)
+ case Failure(_: IllegalStateException) =>
+ logging.warn(this, s"namespace is not unique: $invocationNamespace")(trasnid)
+ }
+ }
+
+ private val ack = {
+ val sender = if (UserEvents.enabled) Some(new UserEventSender(producer)) else None
+ new MessagingActiveAck(producer, instance, sender)
+ }
+
+ // we don't need to store health action results in normal case
+ private val healthActionAck: ActiveAck = new HealthActionAck(producer)
+
+ private val collectLogs = new LogStoreCollector(logsProvider)
+
+ /** Stores an activation in the database. */
+ private val store = (tid: TransactionId, activation: WhiskActivation, isBlocking: Boolean, context: UserContext) => {
+ implicit val transid: TransactionId = tid
+ activationStore.storeAfterCheck(activation, isBlocking, None, context)(tid, notifier = None, logging)
+ }
+
+ private def healthActivationClientFactory(f: ActorRefFactory,
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ rev: DocRevision,
+ schedulerHost: String,
+ rpcPort: Int,
+ containerId: ContainerId): ActorRef =
+ f.actorOf(Props(HealthActivationServiceClient()))
+
+ private def healthContainerProxyFactory(f: ActorRefFactory, healthManger: ActorRef): ActorRef = {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ FunctionPullingContainerProxy
+ .props(
+ containerFactory.createContainer,
+ entityStore,
+ namespaceBlacklist,
+ WhiskAction.get,
+ dataManagementService,
+ healthActivationClientFactory,
+ healthActionAck,
+ store,
+ collectLogs,
+ getLiveContainerCount,
+ getWarmedContainerLimit,
+ instance,
+ healthManger,
+ poolConfig,
+ containerProxyTimeoutConfig))
+ }
+
+ private val invokerHealthManager =
+ actorSystem.actorOf(
+ InvokerHealthManager.props(instance, healthContainerProxyFactory, dataManagementService, entityStore))
+ FPCInvokerReactive.invokerHealthManagerActor = Some(invokerHealthManager)
+ invokerHealthManager ! Enable
+
+ private def activationClientFactory(etcd: EtcdClient)(
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ schedulerHost: String,
+ rpcPort: Int,
+ tryOtherScheduler: Boolean = false): Future[ActivationServiceClient] = {
+
+ if (!tryOtherScheduler) {
+ val setting =
+ GrpcClientSettings
+ .connectToServiceAt(schedulerHost, rpcPort)
+ .withTls(grpcConfig.tls)
+ Future {
+ ActivationServiceClient(setting)
+ }.andThen {
+ case Failure(t) =>
+ logging.error(
+ this,
+ s"unable to create activation client for action ${fqn}: ${t} on original scheduler: ${schedulerHost}:${rpcPort}")
+ }
+ } else {
+ val leaderKey = queue(invocationNamespace, fqn, leader = true)
+ etcd
+ .get(leaderKey)
+ .flatMap { res =>
+ require(!res.getKvsList.isEmpty)
+
+ val endpoint: String = res.getKvsList.get(0).getValue
+ Future(SchedulerEndpoints.parse(endpoint))
+ .flatMap(Future.fromTry)
+ .map { schedulerEndpoint =>
+ val setting =
+ GrpcClientSettings
+ .connectToServiceAt(schedulerEndpoint.host, schedulerEndpoint.rpcPort)
+ .withTls(grpcConfig.tls)
+
+ ActivationServiceClient(setting)
+ }
+ .andThen {
+ case Failure(t) =>
+ logging.error(this, s"unable to create activation client for action ${fqn}: ${t}")
+ }
+ }
+ }
+
+ }
+
+ private def sendAckToScheduler(schedulerInstanceId: SchedulerInstanceId,
+ creationAckMessage: ContainerCreationAckMessage): Future[RecordMetadata] = {
+ val topic = s"${Invoker.topicPrefix}creationAck${schedulerInstanceId.asString}"
+ val reschedulable =
+ creationAckMessage.error.map(ContainerCreationError.whiskErrors.contains(_)).getOrElse(false)
+ if (reschedulable) {
+ MetricEmitter.emitCounterMetric(
+ LoggingMarkers.INVOKER_CONTAINER_CREATE(creationAckMessage.action.toString, "reschedule"))
+ } else if (creationAckMessage.error.nonEmpty) {
+ MetricEmitter.emitCounterMetric(
+ LoggingMarkers.INVOKER_CONTAINER_CREATE(creationAckMessage.action.toString, "failed"))
+ }
+
+ producer.send(topic, creationAckMessage).andThen {
+ case Success(_) =>
+ logging.info(
+ this,
+ s"Posted ${if (reschedulable) "rescheduling"
+ else if (creationAckMessage.error.nonEmpty) "failed"
+ else "success"} ack of container creation ${creationAckMessage.creationId} for ${creationAckMessage.invocationNamespace}/${creationAckMessage.action}")
+ case Failure(t) =>
+ logging.error(
+ this,
+ s"failed to send container creation ack message(${creationAckMessage.creationId}) for ${creationAckMessage.invocationNamespace}/${creationAckMessage.action} to scheduler: ${t.getMessage}")
+ }
+ }
+
+ /** Creates a ContainerProxy Actor when being called. */
+ private val childFactory = (f: ActorRefFactory) => {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ FunctionPullingContainerProxy
+ .props(
+ containerFactory.createContainer,
+ entityStore,
+ namespaceBlacklist,
+ WhiskAction.get,
+ dataManagementService,
+ clientProxyFactory,
+ ack,
+ store,
+ collectLogs,
+ getLiveContainerCount,
+ getWarmedContainerLimit,
+ instance,
+ invokerHealthManager,
+ poolConfig,
+ containerProxyTimeoutConfig))
+ }
+
+ /** Creates a ActivationClientProxy Actor when being called. */
+ private def clientProxyFactory(f: ActorRefFactory,
+ invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ rev: DocRevision,
+ schedulerHost: String,
+ rpcPort: Int,
+ containerId: ContainerId): ActorRef = {
+ implicit val transId = TransactionId.invokerNanny
+ f.actorOf(
+ ActivationClientProxy
+ .props(invocationNamespace, fqn, rev, schedulerHost, rpcPort, containerId, activationClientFactory(etcdClient)))
+ }
+
+ val prewarmingConfigs: List[PrewarmingConfig] = {
+ ExecManifest.runtimesManifest.stemcells.flatMap {
+ case (mf, cells) =>
+ cells.map { cell =>
+ PrewarmingConfig(cell.initialCount, new CodeExecAsString(mf, "", None), cell.memory)
+ }
+ }.toList
+ }
+
+ private val pool =
+ actorSystem.actorOf(
+ ContainerPoolV2
+ .props(childFactory, invokerHealthManager, poolConfig, instance, prewarmingConfigs, sendAckToScheduler))
+
+ private def getLiveContainerCount(invocationNamespace: String,
+ fqn: FullyQualifiedEntityName,
+ revision: DocRevision): Future[Long] = {
+ val namespacePrefix = containerPrefix(ContainerKeys.namespacePrefix, invocationNamespace, fqn, Some(revision))
+ val inProgressPrefix = containerPrefix(ContainerKeys.inProgressPrefix, invocationNamespace, fqn, Some(revision))
+ val warmedPrefix = containerPrefix(ContainerKeys.warmedPrefix, invocationNamespace, fqn, Some(revision))
+ for {
+ namespaceCount <- etcdClient.getCount(namespacePrefix)
+ inProgressCount <- etcdClient.getCount(inProgressPrefix)
+ warmedCount <- etcdClient.getCount(warmedPrefix)
+ } yield {
+ namespaceCount + inProgressCount + warmedCount
+ }
+ }
+
+ /** Initialize message consumers */
+ private val msgProvider = SpiLoader.get[MessagingProvider]
+ //number of peeked messages - increasing the concurrentPeekFactor improves concurrent usage, but adds risk for message loss in case of crash
+ private val maxPeek = loadConfigOrThrow[Int](ConfigKeys.containerCreationMaxPeek)
+ private var consumer: Option[ContainerMessageConsumer] = Some(
+ new ContainerMessageConsumer(
+ instance,
+ pool,
+ entityStore,
+ cfg,
+ msgProvider,
+ longPollDuration = 1.second,
+ maxPeek,
+ sendAckToScheduler))
+
+ 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
+ complete("Success disable invoker")
Review comment:
nit: `Successfully disabled invoker`. Is it possible to include the invoker id here?
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
Is this the same thing as the `idle-container` config? Or is the warm container removed even if it has received an activation in the last 60 minutes?
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f75b616) into [master](https://codecov.io/gh/apache/openwhisk/commit/cf36299d5ee45aa014ec84326d3a69f5b2df446c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf36299) will **decrease** coverage by `21.47%`.
> The diff coverage is `0.86%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
==========================================
- Coverage 26.10% 4.62% -21.48%
==========================================
Files 227 236 +9
Lines 13118 13611 +493
Branches 537 566 +29
==========================================
- Hits 3424 630 -2794
- Misses 9694 12981 +3287
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `40.90% <0.00%> (-23.94%)` | :arrow_down: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `0.00% <0.00%> (-93.34%)` | :arrow_down: |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `0.00% <ø> (-68.81%)` | :arrow_down: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `0.00% <ø> (-69.36%)` | :arrow_down: |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (-58.63%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `66.25% <100.00%> (-29.40%)` | :arrow_down: |
| [...ain/scala/org/apache/openwhisk/spi/SpiLoader.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3NwaS9TcGlMb2FkZXIuc2NhbGE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...scala/org/apache/openwhisk/core/FeatureFlags.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvRmVhdHVyZUZsYWdzLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [108 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf36299...f75b616](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647265553
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala
##########
@@ -1440,10 +1440,7 @@ class FunctionPullingContainerProxyTests
Some(instanceId),
Some(testContainerId)),
""))
- inAnyOrder {
- probe.expectMsg(Transition(machine, Paused, Running))
- probe.expectMsgType[Resumed]
- }
+ probe.expectMsgAllClassOf(Transition(machine, Paused, Running).getClass, classOf[Resumed])
Review comment:
There is no constraint on ordering for messages `Transition(machine, Paused, Running)` and `the Resumed(warmedData)`,
Previous `inAnyOrder` doesn't work here due to `probe is not a mock object`(document: https://www.scalatest.org/user_guide/testing_with_mock_objects)
Another option is ` use probe.expectMsgAllof`, but it is not easy to get(or create) the `Resumed(WarmedData)` object,
So i used `expectMsgAllClassOf`, but it seems it is not good here.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db and it is for `namespace`, one namespace's all actions complete for this `keepingCount` value. Only frequent invocation actions under that namepsace can have this value.
So my opinion is, in spite of infect the non-scheduler code, it is better to add above 2 fields to `case class UserLimits`,
anyway, the non-scheduler codes can run well.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5acd88) into [master](https://codecov.io/gh/apache/openwhisk/commit/96330437d63b5291a020d8a2ba1b401f2cc84ab5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9633043) will **increase** coverage by `27.70%`.
> The diff coverage is `1.31%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 45.64% 73.35% +27.70%
===========================================
Files 234 236 +2
Lines 13389 13616 +227
Branches 551 571 +20
===========================================
+ Hits 6112 9988 +3876
+ Misses 7277 3628 -3649
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `78.63% <0.00%> (+3.29%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `94.49% <ø> (+18.11%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `69.35% <ø> (ø)` | |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `57.26% <0.00%> (-22.05%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.70% <100.00%> (+0.05%)` | :arrow_up: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...whisk/connector/kafka/KafkaProducerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYVByb2R1Y2VyQ29ubmVjdG9yLnNjYWxh) | `55.00% <0.00%> (-32.50%)` | :arrow_down: |
| [...whisk/connector/kafka/KafkaConsumerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYUNvbnN1bWVyQ29ubmVjdG9yLnNjYWxh) | `59.15% <0.00%> (-22.54%)` | :arrow_down: |
| ... and [137 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9633043...a5acd88](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5eb296) into [master](https://codecov.io/gh/apache/openwhisk/commit/ecb2a980659f28d0adbd9ef837afaf4cb2b695bf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ecb2a98) will **increase** coverage by `44.85%`.
> The diff coverage is `45.29%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 28.91% 73.76% +44.85%
===========================================
Files 219 223 +4
Lines 11775 12211 +436
Branches 506 520 +14
===========================================
+ Hits 3405 9008 +5603
+ Misses 8370 3203 -5167
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `76.35% <0.00%> (+6.55%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../containerpool/logging/ElasticSearchLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0VsYXN0aWNTZWFyY2hMb2dTdG9yZS5zY2FsYQ==) | `92.85% <ø> (+92.85%)` | :arrow_up: |
| [...sk/core/containerpool/logging/SplunkLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL1NwbHVua0xvZ1N0b3JlLnNjYWxh) | `81.81% <0.00%> (+81.81%)` | :arrow_up: |
| [...ache/openwhisk/core/database/ActivationStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQWN0aXZhdGlvblN0b3JlLnNjYWxh) | `92.30% <ø> (ø)` | |
| [...penwhisk/core/database/ArtifactStoreProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RTdG9yZVByb3ZpZGVyLnNjYWxh) | `66.66% <ø> (ø)` | |
| [...he/openwhisk/core/database/AttachmentSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXR0YWNobWVudFN1cHBvcnQuc2NhbGE=) | `100.00% <ø> (+26.31%)` | :arrow_up: |
| [...che/openwhisk/core/database/CouchDbRestStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQ291Y2hEYlJlc3RTdG9yZS5zY2FsYQ==) | `71.21% <ø> (+19.69%)` | :arrow_up: |
| [...ore/database/azblob/AzureBlobAttachmentStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvYXpibG9iL0F6dXJlQmxvYkF0dGFjaG1lbnRTdG9yZS5zY2FsYQ==) | `11.53% <ø> (+11.53%)` | :arrow_up: |
| [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <ø> (ø)` | |
| ... and [214 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e65f899...e5eb296](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698214622
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(e.g. 50.milliseconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r698214622
##########
File path: core/invoker/src/main/resources/application.conf
##########
@@ -155,6 +155,7 @@ whisk {
#aka 'How long should a container sit idle until we kill it?'
idle-container = 10 minutes
pause-grace = 50 milliseconds
+ keeping-duration = 60 minutes
Review comment:
For different configuration.
* idle-container, e.g.
If a FunctionPullingContainerProxy actor already executed some activations, but didn't execute activation for some time(e.g. 50.milliseconds), FunctionPullingContainerProxy would goto(Paused), then it will create a timer
```
case _ -> Paused => startSingleTimer(IdleTimeoutName, StateTimeout, idleTimeout)
```
we can see, it would send `StateTimeout` after `idleTimeout`, then, StateTimeout would be handled by below codes, it would judge this FunctionPullingContainerProxy whether in `warmedContainerKeepingCount`
```
when(Paused) {
...
case Event(StateTimeout, data: WarmData) =>
(for {
count <- getLiveContainerCount(data.invocationNamespace, data.action.fullyQualifiedName(false), data.revision)
(warmedContainerKeepingCount, warmedContainerKeepingTimeout) <- getWarmedContainerLimit(
data.invocationNamespace)
} yield {
logging.info(
this,
s"Live container count: ${count}, warmed container keeping count configuration: ${warmedContainerKeepingCount} in namespace: ${data.invocationNamespace}")
if (count <= warmedContainerKeepingCount) {
Keep(warmedContainerKeepingTimeout)
} else {
Remove
}
}).pipeTo(self)
stay
...
}
```
* keeping-duration
Then, if this FunctionPullingContainerProxy is not in `warmedContainerKeepingCount`, it would be removed.
otherwise, this FunctionPullingContainerProxy would keep more keeping-duration time.
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647260192
##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/invoker/FPCInvokerReactive.scala
##########
@@ -0,0 +1,483 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.invoker
+
+import akka.Done
+import akka.actor.{ActorRef, ActorRefFactory, ActorSystem, CoordinatedShutdown, Props}
+import akka.grpc.GrpcClientSettings
+import akka.http.scaladsl.server.Directives._
+import akka.http.scaladsl.server.Route
+import com.ibm.etcd.api.Event.EventType
+import com.ibm.etcd.client.kv.KvClient.Watch
+import com.ibm.etcd.client.kv.WatchUpdate
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.ack.{ActiveAck, HealthActionAck, MessagingActiveAck, UserEventSender}
+import org.apache.openwhisk.core.connector._
+import org.apache.openwhisk.core.containerpool._
+import org.apache.openwhisk.core.containerpool.logging.LogStoreProvider
+import org.apache.openwhisk.core.containerpool.v2._
+import org.apache.openwhisk.core.database.{UserContext, _}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.etcd.EtcdKV.ContainerKeys.{containerPrefix}
+import org.apache.openwhisk.core.etcd.EtcdKV.QueueKeys.queue
+import org.apache.openwhisk.core.etcd.EtcdKV.{ContainerKeys, SchedulerKeys}
+import org.apache.openwhisk.core.etcd.EtcdType._
+import org.apache.openwhisk.core.etcd.{EtcdClient, EtcdConfig}
+import org.apache.openwhisk.core.scheduler.{SchedulerEndpoints, SchedulerStates}
+import org.apache.openwhisk.core.service.{DataManagementService, EtcdWorker, LeaseKeepAliveService, WatcherService}
+import org.apache.openwhisk.core.{ConfigKeys, WarmUp, WhiskConfig}
+import org.apache.openwhisk.grpc.{ActivationServiceClient, FetchRequest}
+import org.apache.openwhisk.spi.SpiLoader
+import pureconfig._
+import pureconfig.generic.auto._
+
+import scala.collection.JavaConverters._
+import scala.collection.concurrent.TrieMap
+import scala.concurrent.duration._
+import scala.concurrent.{ExecutionContext, ExecutionContextExecutor, Future}
+import scala.util.{Failure, Success, Try}
+
+case class GrpcServiceConfig(tls: Boolean)
+
+object FPCInvokerReactive extends InvokerProvider {
+
+ override def instance(
+ config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig,
+ limitsConfig: ConcurrencyLimitConfig)(implicit actorSystem: ActorSystem, logging: Logging): InvokerCore =
+ new FPCInvokerReactive(config, instance, producer, poolConfig, limitsConfig)
+
+ var invokerHealthManagerActor: Option[ActorRef] = None
+}
+
+class FPCInvokerReactive(config: WhiskConfig,
+ instance: InvokerInstanceId,
+ producer: MessageProducer,
+ poolConfig: ContainerPoolConfig =
+ loadConfigOrThrow[ContainerPoolConfig](ConfigKeys.containerPool),
+ limitsConfig: ConcurrencyLimitConfig = loadConfigOrThrow[ConcurrencyLimitConfig](
+ ConfigKeys.concurrencyLimit))(implicit actorSystem: ActorSystem, logging: Logging)
+ extends InvokerCore {
+
+ implicit val ec: ExecutionContext = actorSystem.dispatcher
+ implicit val exe: ExecutionContextExecutor = actorSystem.dispatcher
+ implicit val cfg: WhiskConfig = config
+
+ private val logsProvider = SpiLoader.get[LogStoreProvider].instance(actorSystem)
+ logging.info(this, s"LogStoreProvider: ${logsProvider.getClass}")
+
+ private val etcdClient = EtcdClient(loadConfigOrThrow[EtcdConfig](ConfigKeys.etcd).hosts)
+
+ private val grpcConfig = loadConfigOrThrow[GrpcServiceConfig](ConfigKeys.schedulerGrpcService)
+
+ val watcherService: ActorRef = actorSystem.actorOf(WatcherService.props(etcdClient))
+
+ private val leaseService =
+ actorSystem.actorOf(LeaseKeepAliveService.props(etcdClient, instance, watcherService))
+
+ private val etcdWorkerFactory =
+ (f: ActorRefFactory) => f.actorOf(EtcdWorker.props(etcdClient, leaseService))
+
+ val dataManagementService: ActorRef =
+ actorSystem.actorOf(DataManagementService.props(watcherService, etcdWorkerFactory))
+
+ private val warmedSchedulers = TrieMap[String, String]()
+ private var warmUpWatcher: Option[Watch] = None
+
+ /**
+ * Factory used by the ContainerProxy to physically create a new container.
+ *
+ * Create and initialize the container factory before kicking off any other
+ * task or actor because further operation does not make sense if something
+ * goes wrong here. Initialization will throw an exception upon failure.
+ */
+ private val containerFactory =
+ SpiLoader
+ .get[ContainerFactoryProvider]
+ .instance(
+ actorSystem,
+ logging,
+ config,
+ instance,
+ Map(
+ "--cap-drop" -> Set("NET_RAW", "NET_ADMIN"),
+ "--ulimit" -> Set("nofile=1024:1024"),
+ "--pids-limit" -> Set("1024")) ++ logsProvider.containerParameters)
+ containerFactory.init()
+
+ CoordinatedShutdown(actorSystem)
+ .addTask(CoordinatedShutdown.PhaseBeforeActorSystemTerminate, "cleanup runtime containers") { () =>
+ containerFactory.cleanup()
+ Future.successful(Done)
+ }
+
+ /** Initialize needed databases */
+ private val entityStore = WhiskEntityStore.datastore()
+ private val activationStore =
+ SpiLoader.get[ActivationStoreProvider].instance(actorSystem, logging)
+
+ private val authStore = WhiskAuthStore.datastore()
+
+ private val namespaceBlacklist: NamespaceBlacklist = new NamespaceBlacklist(authStore)
+
+ Scheduler.scheduleWaitAtMost(loadConfigOrThrow[NamespaceBlacklistConfig](ConfigKeys.blacklist).pollInterval) { () =>
+ logging.debug(this, "running background job to update blacklist")
+ namespaceBlacklist.refreshBlacklist()(ec, TransactionId.invoker).andThen {
+ case Success(set) => logging.info(this, s"updated blacklist to ${set.size} entries")
+ case Failure(t) => logging.error(this, s"error on updating the blacklist: ${t.getMessage}")
+ }
+ }
+
+ val containerProxyTimeoutConfig = loadConfigOrThrow[ContainerProxyTimeoutConfig](ConfigKeys.containerProxyTimeouts)
+
+ private def getWarmedContainerLimit(invocationNamespace: String): Future[(Int, FiniteDuration)] = {
+ implicit val trasnid = TransactionId.unknown
+ Identity
+ .get(authStore, EntityName(invocationNamespace))(trasnid)
+ .map { identity =>
+ val warmedContainerKeepingCount = identity.limits.warmedContainerKeepingCount.getOrElse(1)
+ val warmedContainerKeepingTimeout = Try {
+ identity.limits.warmedContainerKeepingTimeout.map(Duration(_).toSeconds.seconds).get
+ }.getOrElse(containerProxyTimeoutConfig.keepingDuration)
+ (warmedContainerKeepingCount, warmedContainerKeepingTimeout)
Review comment:
`warmedContainerKeepingCount, warmedContainerKeepingTimeout` is for `avoid cold start`, doesn't remove one namespace's all warmed containers when container timeout happens, keeps the right amount warmed containers running for some time, when invocation happens next time, have no need to create a container, just uses the non-deleted warmed container.
for a specified namespace, we can configure the warmedContainerKeepingCount, warmedContainerKeepingTimeout in subjects's limit doucment, e.g.

If doesn't configure `warmedContainerKeepingCount, warmedContainerKeepingTimeout` in couchdb, it will use default configuration (warmedContainerKeepingCount: 1, warmedContainerKeepingTimeout: "60 minutes")
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647265553
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala
##########
@@ -1440,10 +1440,7 @@ class FunctionPullingContainerProxyTests
Some(instanceId),
Some(testContainerId)),
""))
- inAnyOrder {
- probe.expectMsg(Transition(machine, Paused, Running))
- probe.expectMsgType[Resumed]
- }
+ probe.expectMsgAllClassOf(Transition(machine, Paused, Running).getClass, classOf[Resumed])
Review comment:
~~Make the corresponding test case more stable here.~~
~~There is no constraint on ordering for messages `Transition(machine, Paused, Running)` and `the Resumed(warmedData)`,~~
~~Previous `inAnyOrder` doesn't work here due to `probe is not a mock object`(document: https://www.scalatest.org/user_guide/testing_with_mock_objects)~~
~~Another option is ` use probe.expectMsgAllof`, but it is not easy to get(or create) the `Resumed(WarmedData)` object,So i used `expectMsgAllClassOf`, but it seems it is not good here.~~
Seems this idea is better: https://github.com/apache/openwhisk/pull/5128/files#r648066837
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r647265553
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/containerpool/v2/test/FunctionPullingContainerProxyTests.scala
##########
@@ -1440,10 +1440,7 @@ class FunctionPullingContainerProxyTests
Some(instanceId),
Some(testContainerId)),
""))
- inAnyOrder {
- probe.expectMsg(Transition(machine, Paused, Running))
- probe.expectMsgType[Resumed]
- }
+ probe.expectMsgAllClassOf(Transition(machine, Paused, Running).getClass, classOf[Resumed])
Review comment:
There is no constraint on ordering for messages `Transition(machine, Paused, Running)` and `the Resumed(warmedData)`,
Previous `inAnyOrder` doesn't work here due to `probe is not a mock object`(document: https://www.scalatest.org/user_guide/testing_with_mock_objects)
Another option is ` use probe.expectMsgAllof`, but it is not easy to get the `Resumed(WarmedData)` object,
So i used `expectMsgAllClassOf`, but it seems it is not good here.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db and it is for `namespace`, one namespace's all actions complete for this `keepingCount` value. Only frequent invocation actions under that namepsace can have this value.
So my opinion is, in spite of infect the non-scheduler code, it is better to add above 2 fields to `case class UserLimits`
--
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:
users@infra.apache.org
[GitHub] [openwhisk] bdoyle0182 commented on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
bdoyle0182 commented on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-867177746
Few comments but mostly looks good to me
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5acd88) into [master](https://codecov.io/gh/apache/openwhisk/commit/96330437d63b5291a020d8a2ba1b401f2cc84ab5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9633043) will **increase** coverage by `28.02%`.
> The diff coverage is `1.31%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 45.64% 73.67% +28.02%
===========================================
Files 234 236 +2
Lines 13389 13616 +227
Branches 551 571 +20
===========================================
+ Hits 6112 10031 +3919
+ Misses 7277 3585 -3692
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `78.63% <0.00%> (+3.29%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `95.41% <ø> (+19.03%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `69.35% <ø> (ø)` | |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `58.11% <0.00%> (-21.20%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.70% <100.00%> (+0.05%)` | :arrow_up: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...whisk/connector/kafka/KafkaProducerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYVByb2R1Y2VyQ29ubmVjdG9yLnNjYWxh) | `60.00% <0.00%> (-27.50%)` | :arrow_down: |
| [...whisk/connector/kafka/KafkaConsumerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYUNvbnN1bWVyQ29ubmVjdG9yLnNjYWxh) | `59.15% <0.00%> (-22.54%)` | :arrow_down: |
| ... and [135 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9633043...a5acd88](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db and it is for `namespace`, one namespace's all actions complete for this `keepingCount` value. Only frequent invocation actions under that namepsace can have this value.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5eb296) into [master](https://codecov.io/gh/apache/openwhisk/commit/ecb2a980659f28d0adbd9ef837afaf4cb2b695bf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ecb2a98) will **increase** coverage by `45.41%`.
> The diff coverage is `45.47%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 28.91% 74.33% +45.41%
===========================================
Files 219 223 +4
Lines 11775 12211 +436
Branches 506 520 +14
===========================================
+ Hits 3405 9077 +5672
+ Misses 8370 3134 -5236
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `76.35% <0.00%> (+6.55%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../containerpool/logging/ElasticSearchLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0VsYXN0aWNTZWFyY2hMb2dTdG9yZS5zY2FsYQ==) | `92.85% <ø> (+92.85%)` | :arrow_up: |
| [...sk/core/containerpool/logging/SplunkLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL1NwbHVua0xvZ1N0b3JlLnNjYWxh) | `81.81% <0.00%> (+81.81%)` | :arrow_up: |
| [...ache/openwhisk/core/database/ActivationStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQWN0aXZhdGlvblN0b3JlLnNjYWxh) | `92.30% <ø> (ø)` | |
| [...penwhisk/core/database/ArtifactStoreProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RTdG9yZVByb3ZpZGVyLnNjYWxh) | `66.66% <ø> (ø)` | |
| [...he/openwhisk/core/database/AttachmentSupport.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXR0YWNobWVudFN1cHBvcnQuc2NhbGE=) | `100.00% <ø> (+26.31%)` | :arrow_up: |
| [...che/openwhisk/core/database/CouchDbRestStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQ291Y2hEYlJlc3RTdG9yZS5zY2FsYQ==) | `71.21% <ø> (+19.69%)` | :arrow_up: |
| [...ore/database/azblob/AzureBlobAttachmentStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvYXpibG9iL0F6dXJlQmxvYkF0dGFjaG1lbnRTdG9yZS5zY2FsYQ==) | `11.53% <ø> (+11.53%)` | :arrow_up: |
| [...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh) | `0.00% <ø> (ø)` | |
| ... and [208 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e65f899...e5eb296](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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:
users@infra.apache.org
[GitHub] [openwhisk] ningyougang commented on a change in pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
ningyougang commented on a change in pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#discussion_r648930261
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -35,12 +35,14 @@ case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
- storeActivations: Option[Boolean] = None)
+ storeActivations: Option[Boolean] = None,
+ warmedContainerKeepingCount: Option[Int] = None,
+ warmedContainerKeepingTimeout: Option[String] = None)
Review comment:
Yes,infects below codes
```
case class UserLimits(invocationsPerMinute: Option[Int] = None,
concurrentInvocations: Option[Int] = None,
firesPerMinute: Option[Int] = None,
allowedKinds: Option[Set[String]] = None,
storeActivations: Option[Boolean] = None,
warmedContainerKeepingCount: Option[Int] = None, // this is the new field
warmedContainerKeepingTimeout: Option[String] = None) // this is the new field
```
If don't want to infect above code, one option is
`make the keepingCount and keepingTime value` to a fixed value this time rather than `read from db`, e.g.
* keepingCount: 1
* keepingTimeout: 60.minutes
But there has a problem that all frequent invocation actions will exist at least `1` container in 60.seconds, obviously, this is a waste of resources
if add above 2 fileds, the benefit is, these 2 values can be configured from db and it is for `namespace`, one namespace's all actions complete for this `keepingCount` value. Only frequent invocation actions under that namepsace can have this value.
So my opinion is, in spite of infect the non-scheduler code, it is better to add above 2 fields to `case class UserLimits`,
anyway, the non-scheduler codes can run well in spite of infect the codes.
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f75b616) into [master](https://codecov.io/gh/apache/openwhisk/commit/cf36299d5ee45aa014ec84326d3a69f5b2df446c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf36299) will **increase** coverage by `47.58%`.
> The diff coverage is `1.30%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 26.10% 73.69% +47.58%
===========================================
Files 227 236 +9
Lines 13118 13611 +493
Branches 537 566 +29
===========================================
+ Hits 3424 10030 +6606
+ Misses 9694 3581 -6113
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `78.63% <0.00%> (+13.79%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `95.41% <ø> (+26.60%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `69.35% <ø> (ø)` | |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `58.11% <0.00%> (-0.51%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.70% <100.00%> (+0.05%)` | :arrow_up: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...whisk/connector/kafka/KafkaConsumerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYUNvbnN1bWVyQ29ubmVjdG9yLnNjYWxh) | `59.15% <0.00%> (-22.54%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/utils/Exceptions.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3V0aWxzL0V4Y2VwdGlvbnMuc2NhbGE=) | `20.00% <0.00%> (-20.00%)` | :arrow_down: |
| ... and [167 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf36299...f75b616](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f75b616) into [master](https://codecov.io/gh/apache/openwhisk/commit/cf36299d5ee45aa014ec84326d3a69f5b2df446c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cf36299) will **increase** coverage by `39.53%`.
> The diff coverage is `1.30%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 26.10% 65.63% +39.53%
===========================================
Files 227 236 +9
Lines 13118 13611 +493
Branches 537 566 +29
===========================================
+ Hits 3424 8934 +5510
+ Misses 9694 4677 -5017
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `70.45% <0.00%> (+5.61%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `95.41% <ø> (+26.60%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `69.35% <ø> (ø)` | |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `58.11% <0.00%> (-0.51%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `95.70% <100.00%> (+0.05%)` | :arrow_up: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...whisk/connector/kafka/KafkaConsumerConnector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYWZrYUNvbnN1bWVyQ29ubmVjdG9yLnNjYWxh) | `59.15% <0.00%> (-22.54%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/utils/Exceptions.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL3V0aWxzL0V4Y2VwdGlvbnMuc2NhbGE=) | `20.00% <0.00%> (-20.00%)` | :arrow_down: |
| ... and [158 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [cf36299...f75b616](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter commented on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5eb296) into [master](https://codecov.io/gh/apache/openwhisk/commit/ecb2a980659f28d0adbd9ef837afaf4cb2b695bf?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ecb2a98) will **increase** coverage by `7.86%`.
> The diff coverage is `40.31%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
==========================================
+ Coverage 28.91% 36.78% +7.86%
==========================================
Files 219 223 +4
Lines 11775 12211 +436
Branches 506 520 +14
==========================================
+ Hits 3405 4492 +1087
+ Misses 8370 7719 -651
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `71.92% <0.00%> (+2.11%)` | :arrow_up: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [...rpool/logging/DockerToActivationFileLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0RvY2tlclRvQWN0aXZhdGlvbkZpbGVMb2dTdG9yZS5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../containerpool/logging/ElasticSearchLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL0VsYXN0aWNTZWFyY2hMb2dTdG9yZS5zY2FsYQ==) | `0.00% <ø> (ø)` | |
| [...sk/core/containerpool/logging/SplunkLogStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9sb2dnaW5nL1NwbHVua0xvZ1N0b3JlLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...penwhisk/core/database/ActivationFileStorage.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQWN0aXZhdGlvbkZpbGVTdG9yYWdlLnNjYWxh) | `0.00% <0.00%> (ø)` | |
| [...ache/openwhisk/core/database/ActivationStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQWN0aXZhdGlvblN0b3JlLnNjYWxh) | `69.23% <ø> (-23.08%)` | :arrow_down: |
| [...nwhisk/core/database/ArtifactActivationStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RBY3RpdmF0aW9uU3RvcmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...penwhisk/core/database/ArtifactStoreProvider.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RTdG9yZVByb3ZpZGVyLnNjYWxh) | `66.66% <ø> (ø)` | |
| [...abase/ArtifactWithFileStorageActivationStore.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvQXJ0aWZhY3RXaXRoRmlsZVN0b3JhZ2VBY3RpdmF0aW9uU3RvcmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| ... and [135 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [e65f899...e5eb296](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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:
users@infra.apache.org
[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5125: [New Scheduler] Implement FPCInvokerReactive
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #5125:
URL: https://github.com/apache/openwhisk/pull/5125#issuecomment-857299803
# [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#5125](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a5acd88) into [master](https://codecov.io/gh/apache/openwhisk/commit/96330437d63b5291a020d8a2ba1b401f2cc84ab5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9633043) will **increase** coverage by `17.43%`.
> The diff coverage is `1.31%`.
[](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #5125 +/- ##
===========================================
+ Coverage 45.64% 63.08% +17.43%
===========================================
Files 234 236 +2
Lines 13389 13616 +227
Branches 551 571 +20
===========================================
+ Hits 6112 8590 +2478
+ Misses 7277 5026 -2251
```
| [Impacted Files](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh) | `68.18% <0.00%> (-7.17%)` | :arrow_down: |
| [...rg/apache/openwhisk/core/ack/HealthActionAck.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvYWNrL0hlYWx0aEFjdGlvbkFjay5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
| [.../openwhisk/core/containerpool/ContainerProxy.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQcm94eS5zY2FsYQ==) | `94.49% <ø> (+18.11%)` | :arrow_up: |
| [...he/openwhisk/core/invoker/FPCInvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9GUENJbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/apache/openwhisk/core/invoker/Invoker.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyLnNjYWxh) | `4.83% <ø> (-64.52%)` | :arrow_down: |
| [...pache/openwhisk/core/invoker/InvokerReactive.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9JbnZva2VyUmVhY3RpdmUuc2NhbGE=) | `0.00% <0.00%> (-79.32%)` | :arrow_down: |
| [.../scala/org/apache/openwhisk/core/WhiskConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2hpc2tDb25maWcuc2NhbGE=) | `93.86% <100.00%> (-1.79%)` | :arrow_down: |
| [...la/org/apache/openwhisk/core/entity/Identity.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0lkZW50aXR5LnNjYWxh) | `93.33% <100.00%> (ø)` | |
| [...che/openwhisk/core/invoker/LogStoreCollector.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvaW52b2tlci9Mb2dTdG9yZUNvbGxlY3Rvci5zY2FsYQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...hisk/core/scheduler/message/ContainerMessage.scala](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29yZS9zY2hlZHVsZXIvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9vcGVud2hpc2svY29yZS9zY2hlZHVsZXIvbWVzc2FnZS9Db250YWluZXJNZXNzYWdlLnNjYWxh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [162 more](https://codecov.io/gh/apache/openwhisk/pull/5125/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [9633043...a5acd88](https://codecov.io/gh/apache/openwhisk/pull/5125?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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-unsubscribe@openwhisk.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org