branch-4.1: [fix](load)fix VNodeChannel close_wait hang#65241
Conversation
During streamload execution, close_wait waits for either add_batches_finished or cancel. When writing to a single replica, encountering a slave node=nullptr condition causes an early return. If no RPC callback is set and no cancel occurs at this point, close_wait becomes deadlock.
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This PR backports a fix to prevent stream load from hanging in close_wait() when VNodeChannel::try_send_pending_block() hits certain early-return error paths (e.g., missing slave node or DNS resolve failure), and adds a regression test to catch the hang.
Changes:
- Add a regression test that enables a BE debug point to simulate “slave node not found” and ensures the load does not hang.
- In
VNodeChannel::try_send_pending_block(), callcancel()and_send_block_callback->clear_in_flight()before returning when a slave node is missing. - Also
cancel()(and clear in-flight) when hostname-to-IP resolution fails for the BRPC HTTP path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| regression-test/suites/load_p0/test_stream_load_close_wait_hang.groovy | New regression to detect stream-load close_wait() hang under a debug-injected error path. |
| be/src/exec/sink/writer/vtablet_writer.cpp | Fixes early-return paths to cancel and clear in-flight RPC state to avoid hangs; adds a debug point for reproduction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Pick #58024