szaszm commented on code in PR #1892:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1892#discussion_r1834157806


##########
extensions/rocksdb-repos/FlowFileRepository.cpp:
##########
@@ -142,7 +144,9 @@ void FlowFileRepository::initialize_repository() {
   }
   logger_->log_info("Reading existing flow files from database");
 
-  const auto it = opendb->NewIterator(rocksdb::ReadOptions());
+  rocksdb::ReadOptions options;
+  options.verify_checksums = verify_checksums_in_rocksdb_reads_;
+  const auto it = opendb->NewIterator(options);

Review Comment:
   ```suggestion
     const auto it = opendb->NewIterator(rocksdb::ReadOptions{
       .verify_checksums = verify_checksums_in_rocksdb_reads_
     });
   ```



##########
extensions/rocksdb-repos/FlowFileRepository.cpp:
##########
@@ -208,6 +212,9 @@ bool FlowFileRepository::initialize(const 
std::shared_ptr<Configure> &configure)
   const auto encrypted_env = 
createEncryptingEnv(utils::crypto::EncryptionManager{configure->getHome()}, 
DbEncryptionOptions{directory_, ENCRYPTION_KEY_NAME});
   logger_->log_info("Using {} FlowFileRepository", encrypted_env ? "encrypted" 
: "plaintext");
 
+  verify_checksums_in_rocksdb_reads_ = 
configure->get(Configure::nifi_flowfile_repository_rocksdb_read_verify_checksums).value_or("false")
 == "true";

Review Comment:
   ```suggestion
     verify_checksums_in_rocksdb_reads_ = 
(configure->get(Configure::nifi_flowfile_repository_rocksdb_read_verify_checksums)
 | utils::flatMap(&utils::string::toBool)).value_or("false");
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to