dubeejw commented on a change in pull request #2855: Cache database attachments
URL: 
https://github.com/apache/incubator-openwhisk/pull/2855#discussion_r144633130
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/WhiskAction.scala
 ##########
 @@ -275,12 +278,10 @@ object WhiskAction extends DocumentFactory[WhiskAction] 
with WhiskEntityQueries[
           val boas = new ByteArrayOutputStream()
           val b64s = Base64.getEncoder().wrap(boas)
 
-          getAttachment[A](db, action.docinfo, attachmentName, b64s).map { _ =>
+          getAttachment[A](db, action, action.docinfo, attachmentName, b64s, 
Some { a: WhiskAction =>
             b64s.close()
-            val newAction = action.copy(exec = exec.inline(boas.toByteArray))
-            newAction.revision(action.rev)
-            newAction
-          }
+            a.copy(exec = exec.inline(boas.toByteArray))
 
 Review comment:
   Need to update revision?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to