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 a38890023b5 [fix](injection) don't disturb CLOSE_LOAD message in
LoadStream (#30097)
a38890023b5 is described below
commit a38890023b5a45aa263cb9dd25c60f55b13fce70
Author: Kaijie Chen <[email protected]>
AuthorDate: Fri Jan 19 10:44:03 2024 +0800
[fix](injection) don't disturb CLOSE_LOAD message in LoadStream (#30097)
---
be/src/runtime/load_stream.cpp | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/be/src/runtime/load_stream.cpp b/be/src/runtime/load_stream.cpp
index efffa23e650..7d494eba88a 100644
--- a/be/src/runtime/load_stream.cpp
+++ b/be/src/runtime/load_stream.cpp
@@ -521,15 +521,19 @@ int LoadStream::on_received_messages(StreamId id,
butil::IOBuf* const messages[]
void LoadStream::_dispatch(StreamId id, const PStreamHeader& hdr,
butil::IOBuf* data) {
VLOG_DEBUG << PStreamHeader_Opcode_Name(hdr.opcode()) << " from " <<
hdr.src_id()
<< " with tablet " << hdr.tablet_id();
- DBUG_EXECUTE_IF("LoadStream._dispatch.unknown_loadid", {
- PUniqueId& load_id = const_cast<PUniqueId&>(hdr.load_id());
- load_id.set_hi(UNKNOWN_ID_FOR_TEST);
- load_id.set_lo(UNKNOWN_ID_FOR_TEST);
- });
- DBUG_EXECUTE_IF("LoadStream._dispatch.unknown_srcid", {
- PStreamHeader& t_hdr = const_cast<PStreamHeader&>(hdr);
- t_hdr.set_src_id(UNKNOWN_ID_FOR_TEST);
- });
+ // CLOSE_LOAD message should not be fault injected,
+ // otherwise the message will be ignored and causing close wait timeout
+ if (hdr.opcode() != PStreamHeader::CLOSE_LOAD) {
+ DBUG_EXECUTE_IF("LoadStream._dispatch.unknown_loadid", {
+ PUniqueId& load_id = const_cast<PUniqueId&>(hdr.load_id());
+ load_id.set_hi(UNKNOWN_ID_FOR_TEST);
+ load_id.set_lo(UNKNOWN_ID_FOR_TEST);
+ });
+ DBUG_EXECUTE_IF("LoadStream._dispatch.unknown_srcid", {
+ PStreamHeader& t_hdr = const_cast<PStreamHeader&>(hdr);
+ t_hdr.set_src_id(UNKNOWN_ID_FOR_TEST);
+ });
+ }
if (UniqueId(hdr.load_id()) != UniqueId(_load_id)) {
Status st = Status::Error<ErrorCode::INVALID_ARGUMENT>(
"invalid load id {}, expected {}", print_id(hdr.load_id()),
print_id(_load_id));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]