From issues-return-39964-archive-asf-public=cust-asf.ponee.io@openwhisk.apache.org Wed Sep 18 15:14:56 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 73F1F180634 for ; Wed, 18 Sep 2019 17:14:56 +0200 (CEST) Received: (qmail 52387 invoked by uid 500); 18 Sep 2019 15:14:55 -0000 Mailing-List: contact issues-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list issues@openwhisk.apache.org Received: (qmail 52378 invoked by uid 99); 18 Sep 2019 15:14:55 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Sep 2019 15:14:55 +0000 From: GitBox To: issues@openwhisk.apache.org Subject: [GitHub] [openwhisk] rabbah commented on a change in pull request #4624: Combines active ack and slot release when both are available. Message-ID: <156881969578.17804.5704710304585730631.gitbox@gitbox.apache.org> Date: Wed, 18 Sep 2019 15:14:55 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit rabbah commented on a change in pull request #4624: Combines active ack and slot release when both are available. URL: https://github.com/apache/openwhisk/pull/4624#discussion_r325736845 ########## File path: common/scala/src/main/scala/org/apache/openwhisk/core/connector/Message.scala ########## @@ -64,43 +64,34 @@ case class ActivationMessage(override val transid: TransactionId, def causedBySequence: Boolean = cause.isDefined } -object ActivationMessage extends DefaultJsonProtocol { - - def parse(msg: String) = Try(serdes.read(msg.parseJson)) - - private implicit val fqnSerdes = FullyQualifiedEntityName.serdes - implicit val serdes = jsonFormat11(ActivationMessage.apply) -} - /** * Message that is sent from the invoker to the controller after action is completed or after slot is free again for * new actions. */ abstract class AcknowledegmentMessage(private val tid: TransactionId) extends Message { override val transid: TransactionId = tid - override def serialize: String = { - AcknowledegmentMessage.serdes.write(this).compactPrint - } + override def serialize: String = AcknowledegmentMessage.serdes.write(this).compactPrint + def toJson: JsValue } /** - * This message is sent from the invoker to the controller, after the slot of an invoker that has been used by the - * current action, is free again (after log collection) + * This message is sent from an invoker to the controller, after the resource slot in the invoke, used by the + * corresponding activation, is free again (i.e., after log collection). In some cases, the activation result is + * ready and the slot is freed at the same time. In such cases, the completion message carries the result as well. + * This is reflected by the of a Right() `response` and the param `result` is set to true. + * In some cases the `result` is true but the response is Left() if the message was too large for the message bus. */ case class CompletionMessage(override val transid: TransactionId, - activationId: ActivationId, - isSystemError: Boolean, + response: Either[ActivationId, WhiskActivation], + result: Boolean, // true iff the message is a combined active ack and slot released Review comment: @chetanmeh I pushed a commit to implement the new type discussed earlier. I did not see your comment earlier. Do the changes help? I think it makes clearer where split-phase acks are being used and where they aren't. ---------------------------------------------------------------- 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 With regards, Apache Git Services