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 2018/08/23 20:10:21 UTC

[GitHub] csantanapr closed pull request #3980: Log activation retrieval from activation store for block invocations

csantanapr closed pull request #3980: Log activation retrieval from activation store for block invocations
URL: https://github.com/apache/incubator-openwhisk/pull/3980
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/common/scala/src/main/scala/whisk/common/Logging.scala b/common/scala/src/main/scala/whisk/common/Logging.scala
index 31d42a77c1..8149774cf0 100644
--- a/common/scala/src/main/scala/whisk/common/Logging.scala
+++ b/common/scala/src/main/scala/whisk/common/Logging.scala
@@ -260,6 +260,8 @@ object LoggingMarkers {
   // Time of the activation in controller until it is delivered to Kafka
   val CONTROLLER_ACTIVATION = LogMarkerToken(controller, activation, start)
   val CONTROLLER_ACTIVATION_BLOCKING = LogMarkerToken(controller, "blockingActivation", start)
+  val CONTROLLER_ACTIVATION_BLOCKING_DATABASE_RETRIEVAL =
+    LogMarkerToken(controller, "blockingActivationDatabaseRetrieval", count)
 
   // Time that is needed load balance the activation
   val CONTROLLER_LOADBALANCER = LogMarkerToken(controller, loadbalancer, start)
diff --git a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
index 4a0b0ecad9..d0d4f60c50 100644
--- a/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
+++ b/core/controller/src/main/scala/whisk/core/controller/actions/PrimitiveActions.scala
@@ -613,7 +613,13 @@ protected[actions] trait PrimitiveActions {
     if (!result.isCompleted && retries < maxRetries) {
       val schedule = actorSystem.scheduler.scheduleOnce(wait(retries)) {
         activationStore.get(ActivationId(docid.asString), context).onComplete {
-          case Success(activation)             => result.trySuccess(Right(activation))
+          case Success(activation) =>
+            transid.mark(
+              this,
+              LoggingMarkers.CONTROLLER_ACTIVATION_BLOCKING_DATABASE_RETRIEVAL,
+              s"retrieved activation for blocking invocation via DB polling",
+              logLevel = InfoLevel)
+            result.trySuccess(Right(activation))
           case Failure(_: NoDocumentException) => pollActivation(docid, context, result, wait, retries + 1, maxRetries)
           case Failure(t: Throwable)           => result.tryFailure(t)
         }
diff --git a/docs/metrics.md b/docs/metrics.md
index 3569c9a07b..33e2b7eda0 100644
--- a/docs/metrics.md
+++ b/docs/metrics.md
@@ -110,6 +110,10 @@ Metrics below are emitted from within a Controller instance.
   * Example _openwhisk.counter.controller_startup0_count_
   * Records count of controller instance startup
 
+##### Controller Activation Retrieval During Blocking Invocations
+
+* `openwhisk.counter.controller_blockingActivationDatabaseRetrieval_count` (counter) - Records the count of activations the controller has retrieved from the activation store during blocking invocations
+
 ##### Activation Submission
 
 Following metrics record stats around activation handling within Controller


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services