1- #include " FileLogSource.h "
2- #include " FileLog.h "
3- #include " fileLastModifiedTime.h"
1+ #include < Storages/ExternalStream/Log/FileLog.h >
2+ #include < Storages/ExternalStream/Log/FileLogSource.h >
3+ #include < Storages/ExternalStream/Log/ fileLastModifiedTime.h>
44
55#include < Storages/ExternalStream/BreakLines.h>
66#include < base/ClockUtils.h>
@@ -15,10 +15,10 @@ namespace DB
1515{
1616namespace ErrorCodes
1717{
18- extern const int FILE_DOESNT_EXIST;
19- extern const int CANNOT_OPEN_FILE;
20- extern const int CANNOT_FSTAT;
21- extern const int CANNOT_READ_FROM_FILE_DESCRIPTOR;
18+ extern const int FILE_DOESNT_EXIST;
19+ extern const int CANNOT_OPEN_FILE;
20+ extern const int CANNOT_FSTAT;
21+ extern const int CANNOT_READ_FROM_FILE_DESCRIPTOR;
2222}
2323
2424FileLogSource::FileLogSource (
@@ -75,7 +75,6 @@ Chunk FileLogSource::generate()
7575 if (buffer.empty ())
7676 buffer.resize (4 * 1024 * 1024 );
7777
78-
7978 if (!handleCurrentFile ())
8079 return head_chunk.clone ();
8180 }
@@ -183,6 +182,8 @@ void FileLogSource::checkNewFiles()
183182 }
184183
185184 auto new_files{file_log->searchForCandidates ()};
185+ last_check = MonotonicMilliseconds::now ();
186+
186187 if (new_files.empty ())
187188 {
188189 // / FIXME, notification
0 commit comments