This is an automated email from the ASF dual-hosted git repository. plat1ko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new cb8f9e81291 [chore](InjectPoint) Log when entering injection point #34286 cb8f9e81291 is described below commit cb8f9e812913d4176da48a98730a2c6f28f97c44 Author: AlexYue <yj976240...@gmail.com> AuthorDate: Mon Apr 29 23:19:30 2024 +0800 [chore](InjectPoint) Log when entering injection point #34286 --- be/src/cloud/cloud_meta_mgr.cpp | 2 +- be/src/common/sync_point.h | 12 ++++++------ be/src/http/action/config_action.cpp | 2 +- be/src/io/fs/hdfs_file_writer.cpp | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/be/src/cloud/cloud_meta_mgr.cpp b/be/src/cloud/cloud_meta_mgr.cpp index 32f99228088..506c57672d9 100644 --- a/be/src/cloud/cloud_meta_mgr.cpp +++ b/be/src/cloud/cloud_meta_mgr.cpp @@ -131,7 +131,7 @@ bvar::LatencyRecorder g_cloud_commit_txn_resp_redirect_latency("cloud_table_stat class MetaServiceProxy { public: static Status get_client(std::shared_ptr<MetaService_Stub>* stub) { - SYNC_POINT_RETURN_WITH_VALUE("MetaServiceProxy::get_client", Status::OK(), stub); + TEST_SYNC_POINT_RETURN_WITH_VALUE("MetaServiceProxy::get_client", Status::OK(), stub); return get_pooled_client(stub); } diff --git a/be/src/common/sync_point.h b/be/src/common/sync_point.h index 9cddce96e4c..81764a09ee9 100644 --- a/be/src/common/sync_point.h +++ b/be/src/common/sync_point.h @@ -228,12 +228,12 @@ auto try_any_cast_ret(std::vector<std::any>& any) { namespace doris::config { extern bool enable_injection_point; } -# define TEST_INJECTION_POINT(x) if (doris::config::enable_injection_point) { SYNC_POINT(x); } -# define TEST_IDX_INJECTION_POINT(x, index) if (doris::config::enable_injection_point) { IDX_SYNC_POINT(x, index); } -# define TEST_INJECTION_POINT_CALLBACK(x, ...) if (doris::config::enable_injection_point) { SYNC_POINT_CALLBACK(x, __VA_ARGS__); } -# define TEST_INJECTION_POINT_SINGLETON() if (doris::config::enable_injection_point) { SYNC_POINT_SINGLETON(); } -# define TEST_INJECTION_POINT_RETURN_WITH_VALUE(x, default_ret_val, ...) if (doris::config::enable_injection_point) { SYNC_POINT_RETURN_WITH_VALUE(x, default_ret_val, __VA_ARGS__); } -# define TEST_INJECTION_POINT_RETURN_WITH_VOID(x, ...) if (doris::config::enable_injection_point) { SYNC_POINT_RETURN_WITH_VOID(x, __VA_ARGS__); } +# define TEST_INJECTION_POINT(x) if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); SYNC_POINT(x); } +# define TEST_IDX_INJECTION_POINT(x, index) if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); IDX_SYNC_POINT(x, index); } +# define TEST_INJECTION_POINT_CALLBACK(x, ...) if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); SYNC_POINT_CALLBACK(x, __VA_ARGS__); } +# define TEST_INJECTION_POINT_SINGLETON() if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); SYNC_POINT_SINGLETON(); } +# define TEST_INJECTION_POINT_RETURN_WITH_VALUE(x, default_ret_val, ...) if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); SYNC_POINT_RETURN_WITH_VALUE(x, default_ret_val, __VA_ARGS__); } +# define TEST_INJECTION_POINT_RETURN_WITH_VOID(x, ...) if (doris::config::enable_injection_point) { LOG_INFO("enter inject point {}", x); SYNC_POINT_RETURN_WITH_VOID(x, __VA_ARGS__); } #endif // ENABLE_INJECTION_POINT // clang-format on diff --git a/be/src/http/action/config_action.cpp b/be/src/http/action/config_action.cpp index a9de9dc2406..b855de88100 100644 --- a/be/src/http/action/config_action.cpp +++ b/be/src/http/action/config_action.cpp @@ -62,7 +62,7 @@ void ConfigAction::handle_show_config(HttpRequest* req) { writer.StartArray(); for (const auto& _config : config_info) { - if (conf_item != nullptr || conf_item != "") { + if (conf_item != nullptr || !conf_item.empty()) { if (_config[0] == conf_item) { writer.StartArray(); for (const std::string& config_filed : _config) { diff --git a/be/src/io/fs/hdfs_file_writer.cpp b/be/src/io/fs/hdfs_file_writer.cpp index 9ea66ca4da1..54e609a040b 100644 --- a/be/src/io/fs/hdfs_file_writer.cpp +++ b/be/src/io/fs/hdfs_file_writer.cpp @@ -185,11 +185,11 @@ Status HdfsFileWriter::append_hdfs_file(std::string_view content) { written_bytes = hdfsWrite(_hdfs_handler->hdfs_fs, _hdfs_file, content.data(), content.size()); { - [[maybe_unused]] Status error_ret = Status::InternalError( - "write hdfs failed. fs_name: {}, path: {}, error: size exceeds", _fs_name, - _path.native()); - TEST_INJECTION_POINT_RETURN_WITH_VALUE("HdfsFileWriter::append_hdfs_file_error", - error_ret); + TEST_INJECTION_POINT_RETURN_WITH_VALUE( + "HdfsFileWriter::append_hdfs_file_error", + Status::InternalError( + "write hdfs failed. fs_name: {}, path: {}, error: inject error", + _fs_name, _path.native())); } } if (written_bytes < 0) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org