rabbah commented on a change in pull request #2878: Streamingly read user-logs.
URL:
https://github.com/apache/incubator-openwhisk/pull/2878#discussion_r152990888
##########
File path:
core/invoker/src/main/scala/whisk/core/containerpool/ContainerProxy.scala
##########
@@ -371,18 +369,28 @@ class ContainerProxy(factory: (TransactionId, String,
ImageName, Boolean, ByteSi
case Success(ack) => sendActiveAck(tid, ack, job.msg.blocking,
job.msg.rootControllerIndex)
}
.flatMap { activation =>
- collectLogs(tid, container, job.action).map { logs =>
- activation.withLogs(logs)
- }
- }
- .andThen {
- case Success(activation) => storeActivation(tid, activation)
- }
- .flatMap { activation =>
- // Fail the future iff the activation was unsuccessful to facilitate
- // better cleanup logic.
- if (activation.response.isSuccess) Future.successful(activation)
- else Future.failed(ActivationUnsuccessfulError(activation))
+ val start = tid.started(this, LoggingMarkers.INVOKER_COLLECT_LOGS)
+ collectLogs(tid, container, job.action)
Review comment:
my nit about the superfluous future is related to this future continuation
and recovery path which could be come slightly cleaner.
----------------------------------------------------------------
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