martinzink commented on code in PR #1877:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1877#discussion_r1806138742
##########
extensions/standard-processors/processors/TailFile.cpp:
##########
@@ -695,8 +694,8 @@ void TailFile::processSingleFile(core::ProcessSession&
session,
auto flow_file = session.create();
session.write(flow_file, std::ref(file_reader));
- if (file_reader.useLatestFlowFile()) {
- updateFlowFileAttributes(full_file_name, state_copy, fileName,
baseName, extension, flow_file);
+ if (file_reader.endedWithDelimiter() || (state.is_rotated_ &&
flow_file->getSize() > 0)) {
Review Comment:
yeah
> The actual change amidst the many clangtidy fixes and TailFile test
optimizations (runtime went from ~6s to ~1.6s):
>
> I've added a new is_rotated_: bool field to TailState, thats only set to
true during the findRotatedFilesAfterLastReadTime fn, and we not only commit
the split flowfile if its ended with delimiter but also if its rotated and not
empty
--
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]