You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2023/02/08 19:33:59 UTC

[nifi-minifi-cpp] 04/04: MINIFICPP-2043 Reset flowfile repo checkpoint during initialization

This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit 650f7c28b8935ffd7d1ed49a5ce86a812d7ae8c8
Author: Adam Debreceni <ad...@apache.org>
AuthorDate: Wed Feb 8 16:29:47 2023 +0100

    MINIFICPP-2043 Reset flowfile repo checkpoint during initialization
    
    After a C2 update and reload, the flowfile checkpoint pointer was
    pointing to outdated information, causing the flowfile repo to load
    stale data.
    
    Closes #1505
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 extensions/rocksdb-repos/FlowFileRepository.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/extensions/rocksdb-repos/FlowFileRepository.cpp b/extensions/rocksdb-repos/FlowFileRepository.cpp
index 23695536f..15487359a 100644
--- a/extensions/rocksdb-repos/FlowFileRepository.cpp
+++ b/extensions/rocksdb-repos/FlowFileRepository.cpp
@@ -218,6 +218,7 @@ bool FlowFileRepository::need_checkpoint(minifi::internal::OpenRocksDb& opendb)
   return it->Valid();
 }
 void FlowFileRepository::initialize_repository() {
+  checkpoint_.reset();
   auto opendb = db_->open();
   if (!opendb) {
     logger_->log_trace("Couldn't open database, no way to checkpoint");