-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix scope.ParallelRun bug which cause hung when error happens. #16452
Conversation
PR Review 🔍
|
…pipeline start. add parallel run 2 rewrite ParallelRun
PR Code Suggestions ✨
|
修改后的 parallel run 执行流程:
其中第一部分如果有任意报错,将会执行pipeline.cleanup确保其接受者等可以正常退出。 |
#16453) 修复一个当pipeline启动前发生错误,导致pipeline hung住的bug. ___ ### **PR Type** Bug fix ___ ### **Description** - Refactored the `ParallelRun` function in `pkg/sql/compile/scope.go` to handle different pipeline types (JOIN, LOAD, SCAN) and removed the `remote` parameter. - Added new helper functions: `buildJoinParallelRun`, `buildLoadParallelRun`, and `buildScanParallelRun` to modularize the code. - Updated import statements in `pkg/sql/compile/scope.go` to remove duplicates and organize imports. - Updated the call to `ParallelRun` in `pkg/sql/compile/scopeRemoteRun.go` to match the new function signature. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement </strong></td><td><table> <tr> <td> <details> <summary><strong>scope.go</strong><dd><code>Refactor ParallelRun function and add helper functions for different </code><br><code>pipeline types.</code></dd></summary> <hr> pkg/sql/compile/scope.go <li>Removed the <code>remote</code> parameter from the <code>ParallelRun</code> function.<br> <li> Refactored the <code>ParallelRun</code> function to handle different pipeline types <br>(JOIN, LOAD, SCAN).<br> <li> Added new helper functions: <code>buildJoinParallelRun</code>, <br><code>buildLoadParallelRun</code>, and <code>buildScanParallelRun</code>.<br> <li> Updated import statements to remove duplicates and organize imports.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16453/files#diff-1a84d311b058e390f8c70e84f5e0c59dbd42736a85d022e2a283d926d43f5bd6">+354/-308</a></td> </tr> <tr> <td> <details> <summary><strong>scopeRemoteRun.go</strong><dd><code>Update ParallelRun call to match new function signature.</code> </dd></summary> <hr> pkg/sql/compile/scopeRemoteRun.go <li>Updated the call to <code>ParallelRun</code> to remove the <code>remote</code> parameter.<br> </details> </td> <td><a href="https://github.com/matrixorigin/matrixone/pull/16453/files#diff-e597c9151caad687e737d3b97366e5451df63a8c21c9623500cbc737552445a0">+1/-1</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions Approved by: @ouyuanning, @sukki37
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #16439
What this PR does / why we need it:
修复了一个在pipeline执行前发生错误会导致其他已启动的pipeline(如各种带有收数据功能的pipeline)卡死的问题。
PR Type
Bug fix
Description
ParallelRun
function inpkg/sql/compile/scope.go
to handle different pipeline types (JOIN, LOAD, SCAN) by introducing helper functionsbuildJoinParallelRun
,buildLoadParallelRun
, andbuildScanParallelRun
.remote
parameter from theParallelRun
function and updated its calls accordingly.pkg/sql/compile/scope.go
.Changes walkthrough 📝
scope.go
Refactor
ParallelRun
and add helper functions for different pipelinetypes.
pkg/sql/compile/scope.go
ParallelRun
to handle different pipeline types (JOIN, LOAD,SCAN).
buildJoinParallelRun
,buildLoadParallelRun
, andbuildScanParallelRun
.remote
parameter fromParallelRun
.scopeRemoteRun.go
Remove `remote` parameter from `ParallelRun` call.
pkg/sql/compile/scopeRemoteRun.go
remote
parameter from theParallelRun
call.