-
Notifications
You must be signed in to change notification settings - Fork 276
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
add debug tool for remote run #19833
Open
ouyuanning
wants to merge
10
commits into
matrixorigin:main
Choose a base branch
from
ouyuanning:add-debug-tool-for-muilti-cn
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add debug tool for remote run #19833
ouyuanning
wants to merge
10
commits into
matrixorigin:main
from
ouyuanning:add-debug-tool-for-muilti-cn
+575
−366
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ouyuanning
requested review from
m-schen,
zhangxu19830126,
aunjgr,
badboynt1 and
qingxinhome
as code owners
November 6, 2024 07:02
aunjgr
approved these changes
Nov 7, 2024
heni02
approved these changes
Nov 7, 2024
m-schen
approved these changes
Nov 7, 2024
zhangxu19830126
approved these changes
Nov 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
issue #19801
What this PR does / why we need it:
add debug tool for remote run
主要解决在查hung问题的时候,有时候是hung在等其他cn的某个go routine执行结果的返回。
而之前从 txn leak里只能跟踪到直接hung的那个go routine,不知道被等待的那个go routine是什么,这里通过一个注入语句,可以在运行时增加对应的log信息,以便通过等待的compile的内存指针,去找被等待的那个go routine id
使用方法:
假设要执行的sql是: update test_table set b = b + 1 where a < 5000000;
select mo_ctl("dn", "addfaultpoint", "enable_fault_injection");
select mo_ctl("dn", "addfaultpoint", "inject_send_pipeline.1:1:1:.echo.1.test_table"); //在使用时只要修改这里的 test_table 为你要执行的sql的关键字就好了。
那么我们将可以在日志上看到类似这样的日志:
这样就可以根据txn leak的go routine堆栈去找出问题的地方了