Doc-Cirrus/orthanc-mongodb

Orthanc 1.5.7 Warnings.

Closed this issue · 10 comments

After a successfull build against orthanc 1.5.7, the server throws some warning :
W0725 13:19:06.070296 OrthancPluginDatabase.cpp:293] Performance warning in the database index: Some extensions are missing in the plugin W0725 13:19:06.070348 OrthancPluginDatabase.cpp:299] The database extension GetLastChangeIndex() is missing W0725 13:19:06.070365 OrthancPluginDatabase.cpp:304] The database extension TagMostRecentPatient() is missing (affected by issue 58) W0725 13:19:06.073188 OrthancPluginDatabase.cpp:330] Your database index plugin is not compatible with multiple Orthanc writers

kosch commented

@ihor-mozil Can you take care of implementing the missing interfaces? That would be nice.

I'm sorry for the delay. I was on vacation. I'll need some time to catch up here, restore the dev environment etc. I'll take a look at this issue.

This thread still alive, in progress. There were new methods added in Orthanc 1.5.2 and 1.5.4. implementing that takes more time than expected, but I hope to complete that in a week or two, depending on a workload.

@ihor-mozil, I also would like to suggest to sort the resources by a date (StudyDate, LastUpdate) (asc, desc), since orthanc doesn't offer such functionnality.
Also I think i found a bug (not sure if related to the plugin or orthanc itself) but if a study where the PatientID is not set the ParentPatient is not correct but the PatientMainDicomTags is.

@kosch , @ihor-mozil , is there any progress on this.

It's still in progress here. I've started the dev environment is up, but there is minor problem time as usual.

New branch has been created, couple methods have been implemented, the work is still in progress. Not tested yet.
https://github.com/Doc-Cirrus/orthanc-mongodb/tree/Orthanc-1.5.7

@ihor-mozil, Thats some good news I hope you've taken a look at my last comment

@ihor-mozil, I also would like to suggest to sort the resources by a date (StudyDate, LastUpdate) (asc, desc), since orthanc doesn't offer such functionnality.
Also I think i found a bug (not sure if related to the plugin or orthanc itself) but if a study where the PatientID is not set the ParentPatient is not correct but the PatientMainDicomTags is.

so i'll give it a try and report back if bugs were found.

Hi @ihor-mozil, I would lik to report that after I made a build using mongoc@1.15.1 and mongocxx@3.4.0 I've gor some deprecation warning:

Scanning dependencies of target OrthancMongoDBIndex
[  9%] Building CXX object CMakeFiles/OrthancMongoDBIndex.dir/Core/MongoDBConnection.cpp.o
[ 18%] Building CXX object CMakeFiles/OrthancMongoDBIndex.dir/Core/Configuration.cpp.o
[ 27%] Building CXX object CMakeFiles/OrthancMongoDBIndex.dir/IndexPlugin/MongoDBBackend.cpp.o
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp: In member function ‘virtual uint64_t OrthancPlugins::MongoDBBackend::GetResourceCount(OrthancPluginResourceType)’:
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:569:81: warning: ‘int64_t mongocxx::v_noabi::collection::count(bsoncxx::v_noabi::document::view_or_value, const mongocxx::v_noabi::options::count&)’ is deprecated [-Wdeprecated-declarations]
       document{} << "resourceType" << static_cast<int>(resourceType) << finalize);
                                                                                 ^
In file included from /usr/local/include/mongocxx/v_noabi/mongocxx/database.hpp:23:0,
                 from /usr/local/include/mongocxx/v_noabi/mongocxx/client.hpp:20,
                 from /home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:29:
/usr/local/include/mongocxx/v_noabi/mongocxx/collection.hpp:429:38: note: declared here
     MONGOCXX_DEPRECATED std::int64_t count(bsoncxx::document::view_or_value filter,
                                      ^~~~~
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp: In member function ‘virtual bool OrthancPlugins::MongoDBBackend::IsExistingResource(int64_t)’:
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:646:59: warning: ‘int64_t mongocxx::v_noabi::collection::count(bsoncxx::v_noabi::document::view_or_value, const mongocxx::v_noabi::options::count&)’ is deprecated [-Wdeprecated-declarations]
       document{} << "internalId" << internalId << finalize);
                                                           ^
In file included from /usr/local/include/mongocxx/v_noabi/mongocxx/database.hpp:23:0,
                 from /usr/local/include/mongocxx/v_noabi/mongocxx/client.hpp:20,
                 from /home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:29:
/usr/local/include/mongocxx/v_noabi/mongocxx/collection.hpp:429:38: note: declared here
     MONGOCXX_DEPRECATED std::int64_t count(bsoncxx::document::view_or_value filter,
                                      ^~~~~
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp: In member function ‘virtual bool OrthancPlugins::MongoDBBackend::IsProtectedPatient(int64_t)’:
/home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:657:58: warning: ‘int64_t mongocxx::v_noabi::collection::count(bsoncxx::v_noabi::document::view_or_value, const mongocxx::v_noabi::options::count&)’ is deprecated [-Wdeprecated-declarations]
       document{} << "patientId" << internalId << finalize);
                                                          ^
In file included from /usr/local/include/mongocxx/v_noabi/mongocxx/database.hpp:23:0,
                 from /usr/local/include/mongocxx/v_noabi/mongocxx/client.hpp:20,
                 from /home/ft-user/pacs-db/orthanc-mongodb-Orthanc-1.5.7/IndexPlugin/MongoDBBackend.cpp:29:
/usr/local/include/mongocxx/v_noabi/mongocxx/collection.hpp:429:38: note: declared here
     MONGOCXX_DEPRECATED std::int64_t count(bsoncxx::document::view_or_value filter,
                                      ^~~~~
[ 36%] Building CXX object CMakeFiles/OrthancMongoDBIndex.dir/IndexPlugin/Plugin.cpp.o
[ 45%] Linking CXX shared library libOrthancMongoDBIndex.so
[ 45%] Built target OrthancMongoDBIndex
Scanning dependencies of target OrthancMongoDBStorage
[ 54%] Building CXX object CMakeFiles/OrthancMongoDBStorage.dir/Core/MongoDBConnection.cpp.o
[ 63%] Building CXX object CMakeFiles/OrthancMongoDBStorage.dir/Core/Configuration.cpp.o
[ 72%] Building CXX object CMakeFiles/OrthancMongoDBStorage.dir/StoragePlugin/MongoDBStorageArea.cpp.o
[ 81%] Building CXX object CMakeFiles/OrthancMongoDBStorage.dir/StoragePlugin/Plugin.cpp.o
[ 90%] Building CXX object CMakeFiles/OrthancMongoDBStorage.dir/StoragePlugin/MongoDBGridFS.cpp.o
[100%] Linking CXX shared library libOrthancMongoDBStorage.so
[100%] Built target OrthancMongoDBStorage

Hi again @ihor-mozil, I figure out the deprecation warning the count method has been deprecated in favor of count_documents (I've tested and it works)