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


##########
libminifi/src/properties/Properties.cpp:
##########
@@ -199,59 +252,65 @@ void PropertiesImpl::loadConfigureFile(const 
std::filesystem::path& configuratio
     dirty_ = dirty_ || need_to_persist_new_value;
     properties_[key] = {persisted_value, value, need_to_persist_new_value};
   }
-  checksum_calculator_.setFileLocation(properties_file_);
 }
 
 std::filesystem::path PropertiesImpl::getFilePath() const {
   std::lock_guard<std::mutex> lock(mutex_);
-  return properties_file_;
+  return base_properties_file_;
 }
 
 bool PropertiesImpl::commitChanges() {
   std::lock_guard<std::mutex> lock(mutex_);
   if (!dirty_) {
-    logger_->log_info("Attempt to persist, but properties are not updated");
+    logger_->log_debug("commitChanges() called, but properties have not 
changed, nothing to do");
     return true;
   }
-  std::ifstream file(properties_file_, std::ifstream::in);
+  const auto output_file = (persist_to_ == PersistTo::SingleFile ? 
base_properties_file_ : extra_properties_files_dir_name() / 
C2PropertiesFileName);

Review Comment:
   I'd rather keep the functionality and keep the door open for future 
refactors cleaning it up.



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