-
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 support rollback running txn to 1.2 #18775
add support rollback running txn to 1.2 #18775
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #4083
What this PR does / why we need it:
add support rollback running txn
PR Type
Enhancement, Tests
Description
close
method incolumn_cache.go
by removing the locking mechanism and returningnil
.runningSQL
atomic boolean inoperator.go
to track the execution state of SQL transactions.Commit
andRollback
methods to prevent operations if SQL is currently running.EnterRunSql
andExitRunSql
methods to modify therunningSQL
state.operator_test.go
to verify the new behavior of transaction operators, including checks for running SQL, lock skipping, and lock table presence.Changes walkthrough 📝
column_cache.go
Simplify column cache close method
pkg/incrservice/column_cache.go
close
method.close
method to returnnil
.operator.go
Add state tracking for running SQL transactions
pkg/txn/client/operator.go
runningSQL
atomic boolean to track SQL execution state.Commit
andRollback
to prevent operations duringrunning SQL.
EnterRunSql
andExitRunSql
to modifyrunningSQL
state.operator_test.go
Add tests for transaction operator enhancements
pkg/txn/client/operator_test.go
Commit
andRollback
cannot be performed duringrunning SQL.