diff OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5603:b2a97dfd719f

monitoring of stable resources now also considers the resource type
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 08 May 2024 10:29:35 +0200
parents c1ed59a5bdc2
children 3f24eb4013d8 0e16e677fe64
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp	Tue May 07 19:20:52 2024 +0200
+++ b/OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp	Wed May 08 10:29:35 2024 +0200
@@ -966,7 +966,7 @@
               type == ResourceType_Study ||
               type == ResourceType_Series)
           {
-            target.isStable_ = !transaction.GetTransactionContext().IsUnstableResource(internalId);
+            target.isStable_ = !transaction.GetTransactionContext().IsUnstableResource(type, internalId);
 
             if (LookupStringMetadata(tmp, target.metadata_, MetadataType_LastUpdate))
             {
@@ -3523,9 +3523,9 @@
         transaction.LogChange(status.patientId_, ChangeType_NewChildInstance, ResourceType_Patient, hashPatient_);
         
         // Mark the parent resources of this instance as unstable
-        transaction.GetTransactionContext().MarkAsUnstable(status.seriesId_, ResourceType_Series, hashSeries_);
-        transaction.GetTransactionContext().MarkAsUnstable(status.studyId_, ResourceType_Study, hashStudy_);
-        transaction.GetTransactionContext().MarkAsUnstable(status.patientId_, ResourceType_Patient, hashPatient_);
+        transaction.GetTransactionContext().MarkAsUnstable(ResourceType_Series, status.seriesId_, hashSeries_);
+        transaction.GetTransactionContext().MarkAsUnstable(ResourceType_Study, status.studyId_, hashStudy_);
+        transaction.GetTransactionContext().MarkAsUnstable(ResourceType_Patient, status.patientId_, hashPatient_);
         transaction.GetTransactionContext().SignalAttachmentsAdded(instanceSize);
 
         storeStatus_ = StoreStatus_Success;