Skip to content

Commit

Permalink
[Enhancement] validate loop_count_wait_fragments_finish config value …
Browse files Browse the repository at this point in the history
…(backport #54395) (#54466)

Co-authored-by: Kevin Cai <[email protected]>
  • Loading branch information
mergify[bot] and kevincai authored Dec 27, 2024
1 parent d624b56 commit 8352ee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ CONF_String(dependency_librdkafka_debug, "all");
// DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, WARN by default
CONF_mInt16(pulsar_client_log_level, "2");

// max loop count when be waiting its fragments finish
// max loop count when be waiting its fragments finish. It has no effect if the var is configured with value <= 0.
CONF_Int64(loop_count_wait_fragments_finish, "0");

// the maximum number of connections in the connection pool for a single jdbc url
Expand Down
5 changes: 5 additions & 0 deletions be/src/runtime/exec_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,11 @@ void ExecEnv::destroy() {
}

void ExecEnv::_wait_for_fragments_finish() {
if (config::loop_count_wait_fragments_finish < 0) {
LOG(WARNING) << "'config::loop_count_wait_fragments_finish' is set to a negative integer, ignore it.";
return;
}

size_t max_loop_secs = config::loop_count_wait_fragments_finish * 10;
if (max_loop_secs == 0) {
return;
Expand Down

0 comments on commit 8352ee9

Please sign in to comment.