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 2018/07/23 13:45:10 UTC

[GitHub] markusthoemmes closed pull request #3891: Shutdown AttachmentStore in CosmosDBArtifactStore

markusthoemmes closed pull request #3891: Shutdown AttachmentStore in CosmosDBArtifactStore
URL: https://github.com/apache/incubator-openwhisk/pull/3891
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala b/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala
index fac08f33f0..116995e049 100644
--- a/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala
+++ b/common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala
@@ -401,7 +401,10 @@ class CosmosDBArtifactStore[DocumentAbstraction <: DocumentSerializer](protected
       .map(as => as.deleteAttachments(doc.id))
       .getOrElse(Future.successful(true)) // For CosmosDB it is expected that the entire document is deleted.
 
-  override def shutdown(): Unit = clientRef.close()
+  override def shutdown(): Unit = {
+    attachmentStore.foreach(_.shutdown())
+    clientRef.close()
+  }
 
   private def isNotFound[A <: DocumentAbstraction](e: DocumentClientException) =
     e.getStatusCode == StatusCodes.NotFound.intValue


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services