Skip to content

Commit

Permalink
make reader flush timeout adjustable globally (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyuuttaaoo authored Jun 27, 2024
1 parent 3bc45ad commit 9db48d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/config_manager/ConfigManagerBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ DECLARE_FLAG_BOOL(enable_collection_mark);
DECLARE_FLAG_BOOL(enable_env_ref_in_config);

DEFINE_FLAG_STRING(ALIYUN_LOG_FILE_TAGS, "default env file key to load tags", "");
DEFINE_FLAG_INT32(default_reader_flush_timeout, "Timeout before incomplete log is flushed", 5);

namespace logtail {

Expand Down Expand Up @@ -619,7 +620,7 @@ void ConfigManagerBase::LoadSingleUserConfig(const std::string& logName, const J
if (logEndReg != "" && CheckRegFormat(logEndReg) == false) {
throw ExceptionBase("The log end line is not value regex : " + logEndReg);
}
int readerFlushTimeout = 5;
int readerFlushTimeout = INT32_FLAG(default_reader_flush_timeout);
if (value.isMember("reader_flush_timeout"))
readerFlushTimeout = GetIntValue(value, "reader_flush_timeout");

Expand Down

0 comments on commit 9db48d0

Please sign in to comment.