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:
[email protected]


With regards,
Apache Git Services

Reply via email to