bjustin-ibm opened a new issue #2640: activation write can delay HTTP response 
for trigger fire
URL: https://github.com/apache/incubator-openwhisk/issues/2640
 
 
   I have a client (the [Kafka feed 
provider](https://github.com/apache/incubator-openwhisk-package-kafka) 
actually) which fires triggers by POST'ing to a trigger URL. I noticed recently 
that a particular trigger was fired 3 times in response to a single event, 
rather than the expected once. In the end, the problem was that the HTTP client 
in the feed provider timed out while waiting for the trigger fire to succeed. 
It then retried twice before getting a successful 200 response in a timely 
fashion. However, all of these POSTs resulting in successful trigger activation.
   
   After digging into the controller logs, I found that the issue was caused by 
a slow activation write (which took almost 60 seconds). Apparently the HTTP 
response from the controller does not complete until the activation record is 
successfully written. Additionally, @markusthoemmes confirmed that any rules 
attached to this trigger are indeed activated before the trigger activation 
record is successfully written to the DB.
   
   As I see it, this problem can be solved in one of two ways:
   - Have the controller complete the HTTP response as soon as the rules are 
activated, without waiting for the activation record to be written to the DB. I 
believe sending a response at this time better indicates that what the client 
asked to do (fire the trigger) has succeeded, and they should not be made to 
wait for activation bookkeeping to complete.
   - Stop writing trigger activations entirely. I believe this idea has been 
kicked around by some, but I am not sure of the status of this proposal. 
Additionally, I personally find that trigger activations are useful for 
debugging purposes. For example, an action that is attached to a rule which is 
attached to a trigger is not activating when I think it should. Having trigger 
and rule activations makes it easier to see which part of this chain is failing 
to result in my action being invoked.
   
 
----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to