This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 35150bbc222 [improve](move-memtable) log rpc failures in stream file
writer (#29267)
35150bbc222 is described below
commit 35150bbc222a2bacc40992e18171e6c422feb7a5
Author: Kaijie Chen <[email protected]>
AuthorDate: Thu Jan 4 23:00:46 2024 +0800
[improve](move-memtable) log rpc failures in stream file writer (#29267)
---
be/src/io/fs/stream_sink_file_writer.cpp | 35 ++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/be/src/io/fs/stream_sink_file_writer.cpp
b/be/src/io/fs/stream_sink_file_writer.cpp
index b7cd4ed0bbf..8a14f667d1f 100644
--- a/be/src/io/fs/stream_sink_file_writer.cpp
+++ b/be/src/io/fs/stream_sink_file_writer.cpp
@@ -88,17 +88,25 @@ Status StreamSinkFileWriter::appendv(const Slice* data,
size_t data_cnt) {
st = Status::InternalError("stream sink file writer append data
failed");
});
ok = ok || st.ok();
+ if (!st.ok()) {
+ LOG(WARNING) << "failed to send segment data to backend " <<
stream->dst_id()
+ << ", load_id: " << print_id(_load_id) << ",
index_id: " << _index_id
+ << ", tablet_id: " << _tablet_id << ", segment_id: "
<< _segment_id
+ << ", data_length: " << bytes_req << ", reason: " <<
st;
+ }
}
if (!ok) {
std::stringstream ss;
for (auto& stream : _streams) {
ss << " " << stream->dst_id();
}
- LOG(WARNING) << "failed to write any replicas, load_id: " <<
print_id(_load_id)
- << ", index_id: " << _index_id << ", tablet_id: " <<
_tablet_id
- << ", segment_id: " << _segment_id << ", data_length: "
<< bytes_req
- << ", backends:" << ss.str();
- return Status::InternalError("failed to write any replicas");
+ LOG(WARNING) << "failed to send segment data to any replicas, load_id:
"
+ << print_id(_load_id) << ", index_id: " << _index_id
+ << ", tablet_id: " << _tablet_id << ", segment_id: " <<
_segment_id
+ << ", data_length: " << bytes_req << ", backends:" <<
ss.str();
+ return Status::InternalError(
+ "failed to send segment data to any replicas, tablet_id={},
segment_id={}",
+ _tablet_id, _segment_id);
}
_bytes_appended += bytes_req;
return Status::OK();
@@ -113,16 +121,25 @@ Status StreamSinkFileWriter::finalize() {
auto st = stream->append_data(_partition_id, _index_id, _tablet_id,
_segment_id,
_bytes_appended, {}, true);
ok = ok || st.ok();
+ if (!st.ok()) {
+ LOG(WARNING) << "failed to send segment eos to backend " <<
stream->dst_id()
+ << ", load_id: " << print_id(_load_id) << ",
index_id: " << _index_id
+ << ", tablet_id: " << _tablet_id << ", segment_id: "
<< _segment_id
+ << ", reason: " << st;
+ }
}
if (!ok) {
std::stringstream ss;
for (auto& stream : _streams) {
ss << " " << stream->dst_id();
}
- LOG(WARNING) << "failed to finalize any replicas, load_id: " <<
print_id(_load_id)
- << ", index_id: " << _index_id << ", tablet_id: " <<
_tablet_id
- << ", segment_id: " << _segment_id << ", backends:" <<
ss.str();
- return Status::InternalError("failed to finalize any replicas");
+ LOG(WARNING) << "failed to send segment eos to any replicas, load_id: "
+ << print_id(_load_id) << ", index_id: " << _index_id
+ << ", tablet_id: " << _tablet_id << ", segment_id: " <<
_segment_id
+ << ", backends:" << ss.str();
+ return Status::InternalError(
+ "failed to send segment eos to any replicas, tablet_id={},
segment_id={}",
+ _tablet_id, _segment_id);
}
return Status::OK();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]