fgerlits commented on a change in pull request #887:
URL: https://github.com/apache/nifi-minifi-cpp/pull/887#discussion_r481939631
##########
File path: extensions/rocksdb-repos/DatabaseContentRepository.cpp
##########
@@ -64,13 +65,53 @@ void DatabaseContentRepository::stop() {
db_.reset();
}
+DatabaseContentRepository::Session::Session(std::shared_ptr<ContentRepository>
repository) : ContentSession(std::move(repository)) {}
+
+std::shared_ptr<ContentSession> DatabaseContentRepository::createSession() {
+ return std::make_shared<Session>(shared_from_this());
+}
+
+void DatabaseContentRepository::Session::commit() {
+ auto dbContentRepository =
std::static_pointer_cast<DatabaseContentRepository>(repository_);
+ auto opendb = dbContentRepository->db_->open();
+ if (!opendb) {
+ throw Exception(GENERAL_EXCEPTION, "Couldn't open rocksdb database to
commit content changes");
Review comment:
yes, that sounds good
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]