This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new 74f7943550c branch-3.1: [fix](cloud)Not log stack information by Peer
read #57816 (#57849)
74f7943550c is described below
commit 74f7943550c7e74bc08d3b2aa6a8abc7afd560f0
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 11 19:10:55 2025 +0800
branch-3.1: [fix](cloud)Not log stack information by Peer read #57816
(#57849)
Cherry-picked from #57816
Co-authored-by: deardeng <[email protected]>
---
be/src/cloud/cloud_internal_service.cpp | 4 ++--
be/src/io/cache/cached_remote_file_reader.cpp | 2 +-
be/src/io/cache/peer_file_cache_reader.cpp | 13 +++++++------
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/be/src/cloud/cloud_internal_service.cpp
b/be/src/cloud/cloud_internal_service.cpp
index 6f304abe33a..6a7aa3a0c17 100644
--- a/be/src/cloud/cloud_internal_service.cpp
+++ b/be/src/cloud/cloud_internal_service.cpp
@@ -221,7 +221,7 @@ Status handle_peer_file_cache_block_request(const
PFetchPeerDataRequest* request
if (cache == nullptr) {
g_file_cache_get_by_peer_failed_num << 1;
set_error_response(response, "can't get file cache instance");
- return Status::InternalError("can't get file cache instance");
+ return Status::InternalError<false>("can't get file cache instance");
}
io::CacheContext ctx {};
@@ -238,7 +238,7 @@ Status handle_peer_file_cache_block_request(const
PFetchPeerDataRequest* request
g_file_cache_get_by_peer_failed_num << 1;
LOG(WARNING) << "read cache block failed, state=" <<
fb->state();
set_error_response(response, "read cache file error");
- return Status::InternalError("cache block not downloaded");
+ return Status::InternalError<false>("cache block not
downloaded");
}
g_file_cache_get_by_peer_blocks_num << 1;
diff --git a/be/src/io/cache/cached_remote_file_reader.cpp
b/be/src/io/cache/cached_remote_file_reader.cpp
index 44c5b25e225..8be4450e63a 100644
--- a/be/src/io/cache/cached_remote_file_reader.cpp
+++ b/be/src/io/cache/cached_remote_file_reader.cpp
@@ -204,7 +204,7 @@ Status execute_peer_read(const std::vector<FileBlockSPtr>&
empty_blocks, size_t
LOG_EVERY_N(WARNING, 100) << "PeerFileCacheReader host or port is
empty"
<< ", host=" << host << ", port=" << port
<< ", file_path=" << file_path;
- return Status::InternalError("host or port is empty");
+ return Status::InternalError<false>("host or port is empty");
}
SCOPED_RAW_TIMER(&stats.peer_read_timer);
peer_read_counter << 1;
diff --git a/be/src/io/cache/peer_file_cache_reader.cpp
b/be/src/io/cache/peer_file_cache_reader.cpp
index 5fa376728b7..f4b673f7d2f 100644
--- a/be/src/io/cache/peer_file_cache_reader.cpp
+++ b/be/src/io/cache/peer_file_cache_reader.cpp
@@ -75,7 +75,7 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
return Status::OK();
}
if (!_is_doris_table) {
- return Status::NotSupported("peer cache fetch only supports doris
table segments");
+ return Status::NotSupported<false>("peer cache fetch only supports
doris table segments");
}
PFetchPeerDataRequest req;
@@ -98,7 +98,7 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
if (!status.ok()) {
peer_cache_reader_failed_counter << 1;
LOG(WARNING) << "failed to get ip from host " << _host << ": " <<
status.to_string();
- return Status::InternalError("failed to get ip from host {}",
_host);
+ return Status::InternalError<false>("failed to get ip from host
{}", _host);
}
}
std::string brpc_addr = get_host_port(realhost, port);
@@ -109,7 +109,7 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
if (!brpc_stub) {
peer_cache_reader_failed_counter << 1;
LOG(WARNING) << "failed to get brpc stub " << brpc_addr;
- st = Status::RpcError("Address {} is wrong", brpc_addr);
+ st = Status::RpcError<false>("Address {} is wrong", brpc_addr);
return st;
}
LIMIT_REMOTE_SCAN_IO(bytes_read);
@@ -129,7 +129,7 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
peer_cache_reader_read_counter << 1;
brpc_stub->fetch_peer_data(&cntl, &req, &resp, nullptr);
if (cntl.Failed()) {
- return Status::RpcError(cntl.ErrorText());
+ return Status::RpcError<false>(cntl.ErrorText());
}
if (resp.has_status()) {
Status st2 = Status::create(resp.status());
@@ -141,7 +141,7 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
if (data.data().empty()) {
peer_cache_reader_failed_counter << 1;
LOG(WARNING) << "peer cache read empty data" <<
data.block_offset();
- return Status::InternalError("peer cache read empty data");
+ return Status::InternalError<false>("peer cache read empty data");
}
int64_t block_off = data.block_offset();
size_t rel = block_off > static_cast<int64_t>(off)
@@ -159,7 +159,8 @@ Status PeerFileCacheReader::fetch_blocks(const
std::vector<FileBlockSPtr>& block
peer_bytes_per_read << filled;
if (filled != s.size) {
peer_cache_reader_failed_counter << 1;
- return Status::InternalError("peer cache read incomplete: need={},
got={}", s.size, filled);
+ return Status::InternalError<false>("peer cache read incomplete:
need={}, got={}", s.size,
+ filled);
}
peer_cache_reader_succ_counter << 1;
return Status::OK();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]