selfxp commented on a change in pull request #4885:
URL: https://github.com/apache/openwhisk/pull/4885#discussion_r413541358
##########
File path:
common/scala/src/main/scala/org/apache/openwhisk/core/database/ActivationStore.scala
##########
@@ -42,10 +42,18 @@ trait ActivationStore {
* @param notifier cache change notifier
* @return Future containing DocInfo related to stored activation
*/
- def storeAfterCheck(activation: WhiskActivation, context: UserContext)(
- implicit transid: TransactionId,
- notifier: Option[CacheChangeNotification]): Future[DocInfo] = {
- if (context.user.limits.storeActivations.getOrElse(true)) {
+ def storeAfterCheck(activation: WhiskActivation, context:
UserContext)(implicit transid: TransactionId,
+
notifier: Option[CacheChangeNotification],
+
isBlockingActivation: Boolean = false,
+
disableStoreResultConfig: Option[Boolean] =
+
Some(false)): Future[DocInfo] = {
+ if (context.user.limits.storeActivations.getOrElse(true) &&
+ shouldStoreActivation(
+ activation.response.isSuccess,
+ isBlockingActivation,
+ transid.meta.extraLogging,
+ disableStoreResultConfig.get)) {
+
store(activation, context)
} else {
Future.successful(DocInfo(activation.docid))
Review comment:
Added configurable logging for NOT stored activations: activationId,
namespace and response size are part of the log. I think we should differ the
http status code for a different PR that logs all activations with an extensive
metadata selection.
----------------------------------------------------------------
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:
[email protected]