adamdebreceni commented on a change in pull request #877:
URL: https://github.com/apache/nifi-minifi-cpp/pull/877#discussion_r476475343
##########
File path: extensions/rocksdb-repos/FlowFileRepository.cpp
##########
@@ -194,22 +201,27 @@ bool
FlowFileRepository::ExecuteWithRetry(std::function<rocksdb::Status()> opera
* Returns True if there is data to interrogate.
* @return true if our db has data stored.
*/
-bool FlowFileRepository::need_checkpoint(){
- std::unique_ptr<rocksdb::Iterator> it =
std::unique_ptr<rocksdb::Iterator>(db_->NewIterator(rocksdb::ReadOptions()));
+bool FlowFileRepository::need_checkpoint(minifi::internal::OpenRocksDB&
opendb){
+ auto it = opendb.NewIterator(rocksdb::ReadOptions());
for (it->SeekToFirst(); it->Valid(); it->Next()) {
Review comment:
great question, this whole checkpointing needs to be revisited because
it is not really fault tolerant, e.g. it starts reading from the live db if it
couldn't open the checkpoint, there is no retry with the checkpoint etc., for
now I'll replace this magical loop
----------------------------------------------------------------
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]