# HG changeset patch # User Sebastien Jodogne # Date 1551373776 -3600 # Node ID 8bf33fa6843573d4e5e1bf2c9c8026ad81ea173f # Parent 7eb5405b7ed8c096b896c80eba2fc66380997507 Fix missing DB transactions in some write operations diff -r 7eb5405b7ed8 -r 8bf33fa68435 NEWS --- a/NEWS Thu Feb 28 09:29:48 2019 +0100 +++ b/NEWS Thu Feb 28 18:09:36 2019 +0100 @@ -13,6 +13,7 @@ ----------- * Enlarge the support of JSON-to-XML conversion in the REST API +* Fix missing DB transactions in some write operations Version 1.5.5 (2019-02-25) diff -r 7eb5405b7ed8 -r 8bf33fa68435 OrthancServer/ServerIndex.cpp --- a/OrthancServer/ServerIndex.cpp Thu Feb 28 09:29:48 2019 +0100 +++ b/OrthancServer/ServerIndex.cpp Thu Feb 28 18:09:36 2019 +0100 @@ -1935,13 +1935,19 @@ void ServerIndex::DeleteChanges() { boost::mutex::scoped_lock lock(mutex_); + + Transaction transaction(*this); db_.ClearChanges(); + transaction.Commit(0); } void ServerIndex::DeleteExportedResources() { boost::mutex::scoped_lock lock(mutex_); + + Transaction transaction(*this); db_.ClearExportedResources(); + transaction.Commit(0); } @@ -2235,7 +2241,10 @@ const std::string& value) { boost::mutex::scoped_lock lock(mutex_); + + Transaction transaction(*this); db_.SetGlobalProperty(property, value); + transaction.Commit(0); }