adamdebreceni commented on a change in pull request #887:
URL: https://github.com/apache/nifi-minifi-cpp/pull/887#discussion_r481934962
##########
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 I was thinking about it, but couldn't come up with a proper name for
it, I wanted to name it `IO_EXCEPTION` but that is IMO too generic, what do you
think about `REPOSITORY_EXCEPTION`?
----------------------------------------------------------------
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]