arpadboda commented on a change in pull request #715: MINIFICPP-1126 - Reduce 
sawtooth in memory usage of rocksdb flowfile …
URL: https://github.com/apache/nifi-minifi-cpp/pull/715#discussion_r371749842
 
 

 ##########
 File path: extensions/rocksdb-repos/FlowFileRepository.cpp
 ##########
 @@ -69,14 +68,8 @@ void FlowFileRepository::flush() {
     batch.Delete(keys[i]);
   }
 
-
-  if (db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
-    logger_->log_trace("Decrementing %u from a repo size of %u", 
decrement_total, repo_size_.load());
-    if (decrement_total > repo_size_.load()) {
-      repo_size_ = 0;
-    } else {
-      repo_size_ -= decrement_total;
-    }
+  if (!db_->Write(rocksdb::WriteOptions(), &batch).ok()) {
+    logger_->log_warn("Failed to execute batch operation when flushing 
FlowFileRepository");
 
 Review comment:
   https://issues.apache.org/jira/browse/MINIFICPP-1129

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to