liaoxin01 commented on code in PR #30097:
URL: https://github.com/apache/doris/pull/30097#discussion_r1458217774


##########
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) {

Review Comment:
   ```
           DBUG_EXECUTE_IF("LoadStream._dispatch.unknown_loadid", {
               if (hdr.opcode() != PStreamHeader::CLOSE_LOAD) {
                   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);
               }
           });
   ```
   Placing the if condition into the debug point may be better.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to