-
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
add debug info for panic #16635
add debug info for panic #16635
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Review 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
…xone into 0604-debug-txn-panic-1.2
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue ##16548
What this PR does / why we need it:
issue上的问题是事务状态异常。
在出问题的调用栈上,增加事务状态的检测逻辑。
txnIsValid 判断事务状态是否异常。
PR Type
Bug fix, Tests
Description
disttae.CheckTxnIsValid
in multiple functions across the codebase to handle transaction state exceptions.txnIsValid
andCheckTxnIsValid
for consistent transaction validation.Changes walkthrough 📝
6 files
back_exec.go
Add transaction validity check and simplify statement type check.
pkg/frontend/back_exec.go
disttae.CheckTxnIsValid
beforeexecuting statements.
tree.Execute
statement type.back_result_row_stmt.go
Add transaction validity check in result row statements.
pkg/frontend/back_result_row_stmt.go
disttae.CheckTxnIsValid
beforeexecuting result row statements.
back_status_stmt.go
Add transaction validity check in status statements.
pkg/frontend/back_status_stmt.go
disttae.CheckTxnIsValid
beforeexecuting status statements.
mysql_cmd_executor.go
Add transaction validity check in statement execution functions.
pkg/frontend/mysql_cmd_executor.go
disttae.CheckTxnIsValid
inmultiple functions handling statement execution.
compile.go
Add transaction validity check in table scan data source compilation.
pkg/sql/compile/compile.go
disttae.CheckTxnIsValid
incompileTableScanDataSource
.engine.go
Use `txnIsValid` function for transaction validation.
pkg/vm/engine/disttae/engine.go
txnIsValid
function to validatetransactions.
3 files
mysql_cmd_executor_test.go
Add mock expectation for transaction status in tests.
pkg/frontend/mysql_cmd_executor_test.go
Status
method returningtxn.TxnStatus_Active
in multiple test cases.mysql_protocol_test.go
Add mock expectation for transaction status in `TestKill`.
pkg/frontend/mysql_protocol_test.go
Status
method returningtxn.TxnStatus_Active
inTestKill
.session_test.go
Add mock expectation for transaction status in `TestSession_Migrate`.
pkg/frontend/session_test.go
Status
method returningtxn.TxnStatus_Active
inTestSession_Migrate
.1 files
util.go
Add utility functions for transaction validation.
pkg/vm/engine/disttae/util.go
txnIsValid
andCheckTxnIsValid
functions to validate transactionoperators.