This is an automated email from the ASF dual-hosted git repository.
w41ter 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 2042f551574 [chore](be) improve download logs (#39485)
2042f551574 is described below
commit 2042f551574c56158b30043ef0d917dc75a4fb9f
Author: walter <[email protected]>
AuthorDate: Tue Aug 20 09:50:04 2024 +0800
[chore](be) improve download logs (#39485)
---
be/src/http/action/download_action.cpp | 6 ++++--
be/src/http/action/download_binlog_action.cpp | 6 ++++--
be/src/runtime/snapshot_loader.cpp | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/be/src/http/action/download_action.cpp
b/be/src/http/action/download_action.cpp
index 284314f421d..80a7bc28c58 100644
--- a/be/src/http/action/download_action.cpp
+++ b/be/src/http/action/download_action.cpp
@@ -199,8 +199,10 @@ Status DownloadAction::check_token(HttpRequest* req) {
return Status::NotAuthorized("token is not specified.");
}
- if (token_str != _exec_env->token()) {
- return Status::NotAuthorized("invalid token.");
+ const std::string& local_token = _exec_env->token();
+ if (token_str != local_token) {
+ LOG(WARNING) << "invalid download token: " << token_str << ", local
token: " << local_token;
+ return Status::NotAuthorized("invalid token {}", token_str);
}
return Status::OK();
diff --git a/be/src/http/action/download_binlog_action.cpp
b/be/src/http/action/download_binlog_action.cpp
index 589932b116f..e263112da26 100644
--- a/be/src/http/action/download_binlog_action.cpp
+++ b/be/src/http/action/download_binlog_action.cpp
@@ -244,8 +244,10 @@ Status DownloadBinlogAction::_check_token(HttpRequest*
req) {
return Status::InternalError("token is not specified.");
}
- if (token_str != _exec_env->token()) {
- return Status::InternalError("invalid token.");
+ const std::string& local_token = _exec_env->token();
+ if (token_str != local_token) {
+ LOG(WARNING) << "invalid download token: " << token_str << ", local
token: " << local_token;
+ return Status::NotAuthorized("invalid token {}", token_str);
}
return Status::OK();
diff --git a/be/src/runtime/snapshot_loader.cpp
b/be/src/runtime/snapshot_loader.cpp
index f34dfde229a..d04a5463879 100644
--- a/be/src/runtime/snapshot_loader.cpp
+++ b/be/src/runtime/snapshot_loader.cpp
@@ -482,6 +482,8 @@ Status SnapshotLoader::remote_http_download(
remote_be_addr.hostname,
remote_be_addr.port, token);
std::string remote_url_prefix = fmt::format("{}&file={}", base_url,
remote_path);
+ LOG(INFO) << "list remote files: " << remote_url_prefix << ", job: "
<< _job_id
+ << ", task id: " << _task_id << ", remote be: " <<
remote_be_addr;
string file_list_str;
auto list_files_cb = [&remote_url_prefix, &file_list_str](HttpClient*
client) {
RETURN_IF_ERROR(client->init(remote_url_prefix));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]