james94 commented on code in PR #1877:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1877#discussion_r1795658596
##########
extensions/standard-processors/processors/TailFile.cpp:
##########
@@ -724,24 +723,24 @@ void TailFile::processSingleFile(core::ProcessSession&
session,
void TailFile::updateFlowFileAttributes(const std::filesystem::path&
full_file_name, const TailState& state,
const std::filesystem::path& fileName,
const std::string& baseName,
const std::string& extension,
- std::shared_ptr<core::FlowFile>
&flow_file) const {
- logger_->log_info("TailFile {} for {} bytes", fileName,
flow_file->getSize());
- std::string logName = textfragmentutils::createFileName(baseName, extension,
state.position_, flow_file->getSize());
- flow_file->setAttribute(core::SpecialFlowAttribute::PATH,
state.path_.string());
- flow_file->addAttribute(core::SpecialFlowAttribute::ABSOLUTE_PATH,
full_file_name.string());
- flow_file->setAttribute(core::SpecialFlowAttribute::FILENAME, logName);
+ core::FlowFile& flow_file) const {
Review Comment:
Interesting way to update the Flow File attributes switching from shared
pointer to pass by reference. I see you also dereferenced the pointer as you
passed *flow_file into updateFlowFileAttributes. Were you noticing problems
with the shared pointer pass by reference previous approach?
--
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]