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 2020/09/09 05:31:53 UTC

[GitHub] [openwhisk] tysonnorris opened a new pull request #4971: cleaning up logic and test issues with ContainerProxy

tysonnorris opened a new pull request #4971:
URL: https://github.com/apache/openwhisk/pull/4971


   <!--- 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. -->
   Repairing more issues with ContainerProxy. Logic for aborting queued concurrent activations now waits for those activations to be processed before stopping.
   
   ## 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
   - [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: -->
   - [x] Bug fix (generally a non-breaking change which closes an issue).
   - [ ] 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 :).
   - [x] 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] tysonnorris commented on a change in pull request #4971: cleaning up logic and test issues with ContainerProxy

Posted by GitBox <gi...@apache.org>.
tysonnorris commented on a change in pull request #4971:
URL: https://github.com/apache/openwhisk/pull/4971#discussion_r485686883



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
##########
@@ -714,14 +715,19 @@ class ContainerProxy(factory: (TransactionId,
       } else {
         CompletionMessage(tid, result, instance)
       }
-      sendActiveAck(tid, result, job.msg.blocking, job.msg.rootControllerIndex, job.msg.user.namespace.uuid, msg)
-        .andThen {
-          case Failure(e) => logging.error(this, s"failed to send abort ack $e")
-        }
-      storeActivation(tid, result, job.msg.blocking, context).andThen {
-        case Failure(e) => logging.error(this, s"failed to store aborted activation $e")
+      val ack =
+        sendActiveAck(tid, result, job.msg.blocking, job.msg.rootControllerIndex, job.msg.user.namespace.uuid, msg)
+          .recover {

Review comment:
       My concern is when one runs, and fails, not affecting the others. For both ack vs store, as well as processing each item in queue. I can guess though that if one item fails, that the other items will fail as well, so maybe I would just go back to `.andThen` processing to log failures.




----------------------------------------------------------------
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] markusthoemmes commented on a change in pull request #4971: cleaning up logic and test issues with ContainerProxy

Posted by GitBox <gi...@apache.org>.
markusthoemmes commented on a change in pull request #4971:
URL: https://github.com/apache/openwhisk/pull/4971#discussion_r485353391



##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
##########
@@ -697,7 +698,7 @@ class ContainerProxy(factory: (TransactionId,
 
   def abortBuffered(abortResponse: Option[ActivationResponse] = None) = {

Review comment:
       Can we add an explicit return type here to make sure we return a Future?

##########
File path: core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/ContainerProxy.scala
##########
@@ -714,14 +715,19 @@ class ContainerProxy(factory: (TransactionId,
       } else {
         CompletionMessage(tid, result, instance)
       }
-      sendActiveAck(tid, result, job.msg.blocking, job.msg.rootControllerIndex, job.msg.user.namespace.uuid, msg)
-        .andThen {
-          case Failure(e) => logging.error(this, s"failed to send abort ack $e")
-        }
-      storeActivation(tid, result, job.msg.blocking, context).andThen {
-        case Failure(e) => logging.error(this, s"failed to store aborted activation $e")
+      val ack =
+        sendActiveAck(tid, result, job.msg.blocking, job.msg.rootControllerIndex, job.msg.user.namespace.uuid, msg)
+          .recover {

Review comment:
       Do you really want to recover (make the Future succeed) here rather than just log? Same below. The sequence below will always succeed.




----------------------------------------------------------------
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] tysonnorris commented on pull request #4971: cleaning up logic and test issues with ContainerProxy

Posted by GitBox <gi...@apache.org>.
tysonnorris commented on pull request #4971:
URL: https://github.com/apache/openwhisk/pull/4971#issuecomment-690444319


   @markusthoemmes any concerns with this in current form?


----------------------------------------------------------------
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] tysonnorris merged pull request #4971: cleaning up logic and test issues with ContainerProxy

Posted by GitBox <gi...@apache.org>.
tysonnorris merged pull request #4971:
URL: https://github.com/apache/openwhisk/pull/4971


   


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