From 54545c6446b81bf03a56e62320c98d1914c910b4 Mon Sep 17 00:00:00 2001 From: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com> Date: Mon, 24 Oct 2022 11:51:18 +0800 Subject: [PATCH] [improvement](config) enlarge default value of create_table_timeout and remove disable_stream_load_2pc (#13520) Users do not need to set create_table_timeout, it is a ddl command and when encounter a timeout event users will set a lager timeout and retry. Stream load 2pc is used by default in flink connector, so we should not disable it by config, the config item is useless. --- be/src/common/config.h | 1 - be/src/http/action/stream_load.cpp | 4 ---- be/src/http/action/stream_load_2pc.cpp | 7 ------- .../src/main/java/org/apache/doris/common/Config.java | 2 +- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/be/src/common/config.h b/be/src/common/config.h index 8901558abe..94ff9a6122 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -393,7 +393,6 @@ CONF_mInt32(stream_load_record_batch_size, "50"); CONF_Int32(stream_load_record_expire_time_secs, "28800"); // time interval to clean expired stream load records CONF_mInt64(clean_stream_load_record_interval_secs, "1800"); -CONF_mBool(disable_stream_load_2pc, "false"); // OlapTableSink sender's send interval, should be less than the real response time of a tablet writer rpc. // You may need to lower the speed when the sink receiver bes are too busy. diff --git a/be/src/http/action/stream_load.cpp b/be/src/http/action/stream_load.cpp index 52c7eb6937..150b8b5337 100644 --- a/be/src/http/action/stream_load.cpp +++ b/be/src/http/action/stream_load.cpp @@ -290,10 +290,6 @@ Status StreamLoadAction::_on_header(HttpRequest* http_req, StreamLoadContext* ct http_req->header(HTTP_FORMAT_KEY)); } - if (ctx->two_phase_commit && config::disable_stream_load_2pc) { - return Status::InternalError("Two phase commit (2PC) for stream load was disabled"); - } - // check content length ctx->body_bytes = 0; size_t csv_max_body_bytes = config::streaming_load_max_mb * 1024 * 1024; diff --git a/be/src/http/action/stream_load_2pc.cpp b/be/src/http/action/stream_load_2pc.cpp index 914d1e97fb..626025d334 100644 --- a/be/src/http/action/stream_load_2pc.cpp +++ b/be/src/http/action/stream_load_2pc.cpp @@ -40,13 +40,6 @@ void StreamLoad2PCAction::handle(HttpRequest* req) { Status status = Status::OK(); std::string status_result; - if (config::disable_stream_load_2pc) { - status = Status::InternalError("Two phase commit (2PC) for stream load was disabled"); - status_result = status.to_json(); - HttpChannel::send_reply(req, HttpStatus::OK, status_result); - return; - } - StreamLoadContext* ctx = new StreamLoadContext(_exec_env); ctx->ref(); req->set_handler_ctx(ctx); diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java index de1d8015ec..644defbd1a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/Config.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/Config.java @@ -455,7 +455,7 @@ public class Config extends ConfigBase { * In order not to wait too long for create table(index), set a max timeout. */ @ConfField(mutable = true, masterOnly = true) - public static int max_create_table_timeout_second = 60; + public static int max_create_table_timeout_second = 3600; /** * Maximal waiting time for all publish version tasks of one transaction to be finished