Repository navigation
fix: align frontend goroutine id with runtime dump - #25497
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
LGTM.
The implementation change is small and coherent: frontend goroutine ids now reuse the same runtime.Stack-based parser as pkg/util/debug/goroutine, so the ids printed in session_info / leak-transaction logs line up with goroutine dump headers, and cleanup no longer does an extra probe from whatever goroutine happens to perform teardown. The targeted tests I checked passed, and I didn't find a substantive correctness regression in the nearby lifecycle paths.
One non-blocking follow-up: the new test mainly covers the nil-session cleanup path, but the PR's core claim (id matches runtime dump format) is still only weakly asserted. A focused test comparing GetRoutineId() with a runtime.Stack header would tighten that up nicely.
Merge Queue Status
This pull request spent 4 hours 35 minutes 51 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25400 ## What this PR does / why we need it: This PR makes frontend `goRoutineId` use the existing `runtime.Stack`-based goroutine id parser, so ids printed in `session_info` and leak txn logs can be matched directly with `goroutine <id>` in goroutine dumps. It also removes the extra cleanup-time goroutine id probe and keeps the cleanup log focused on the routine goroutine id. That avoids another `runtime.Stack` call during cleanup and keeps the field semantics aligned with the session/routine being cleaned. Tested with: ```sh go test ./pkg/util/debug/goroutine ./pkg/frontend -run 'TestGetRoutineId|Test_routineid' ``` --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25400 ## What this PR does / why we need it: This PR makes frontend `goRoutineId` use the existing `runtime.Stack`-based goroutine id parser, so ids printed in `session_info` and leak txn logs can be matched directly with `goroutine <id>` in goroutine dumps. It also removes the extra cleanup-time goroutine id probe and keeps the cleanup log focused on the routine goroutine id. That avoids another `runtime.Stack` call during cleanup and keeps the field semantics aligned with the session/routine being cleaned. Tested with: ```sh go test ./pkg/util/debug/goroutine ./pkg/frontend -run 'TestGetRoutineId|Test_routineid' ``` --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25400 ## What this PR does / why we need it: This PR makes frontend `goRoutineId` use the existing `runtime.Stack`-based goroutine id parser, so ids printed in `session_info` and leak txn logs can be matched directly with `goroutine <id>` in goroutine dumps. It also removes the extra cleanup-time goroutine id probe and keeps the cleanup log focused on the routine goroutine id. That avoids another `runtime.Stack` call during cleanup and keeps the field semantics aligned with the session/routine being cleaned. Tested with: ```sh go test ./pkg/util/debug/goroutine ./pkg/frontend -run 'TestGetRoutineId|Test_routineid' ``` --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #25400
What this PR does / why we need it:
This PR makes frontend
goRoutineIduse the existingruntime.Stack-based goroutine id parser, so ids printed insession_infoand leak txn logs can be matched directly withgoroutine <id>in goroutine dumps.It also removes the extra cleanup-time goroutine id probe and keeps the cleanup log focused on the routine goroutine id. That avoids another
runtime.Stackcall during cleanup and keeps the field semantics aligned with the session/routine being cleaned.Tested with: