Skip to content

[Bug](sink) fix cancel_at_time not work at parallel_sink/parallel_outfile#61740

Merged
yiguolei merged 3 commits intoapache:branch-4.1from
BiteTheDDDDt:cp_0326
Mar 26, 2026
Merged

[Bug](sink) fix cancel_at_time not work at parallel_sink/parallel_outfile#61740
yiguolei merged 3 commits intoapache:branch-4.1from
BiteTheDDDDt:cp_0326

Conversation

@BiteTheDDDDt
Copy link
Contributor

pick #61739

@BiteTheDDDDt BiteTheDDDDt requested a review from yiguolei as a code owner March 26, 2026 02:52
Copilot AI review requested due to automatic review settings March 26, 2026 02:52
@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes deferred result-buffer cancellation in BE sink operators by using the correct ResultBufferMgr key in parallel modes, so cancel_at_time() actually finds and removes the registered buffer entry (picked from #61739).

Changes:

  • Update ResultSinkLocalState::close() to call cancel_at_time() with query_id when enable_parallel_result_sink is enabled (otherwise use fragment_instance_id).
  • Update ResultFileSinkLocalState::close() to call cancel_at_time() with query_id when enable_parallel_outfile is enabled (otherwise use fragment_instance_id).
  • Add clarifying comments explaining the keying difference between parallel vs non-parallel modes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
be/src/exec/operator/result_sink_operator.cpp Aligns deferred cancellation key with parallel result-sink sender registration (query_id vs fragment_instance_id).
be/src/exec/operator/result_file_sink_operator.cpp Aligns deferred cancellation key with parallel outfile sender registration (query_id vs fragment_instance_id).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@BiteTheDDDDt
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (20/20) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 72.87% (26436/36280)
Line Coverage 56.20% (282707/503027)
Region Coverage 53.76% (235549/438167)
Branch Coverage 55.47% (102232/184290)

@yiguolei yiguolei merged commit 37d0eb7 into apache:branch-4.1 Mar 26, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants