同一个goroutine同时使用事务和非事务,在并发的情况会导致死锁 #2166
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2166
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
使用的版本: xorm.io/xorm v1.3.1
配置和测试代码如下:
返回结果: 一直卡在最后
=== RUN TestFind
[xorm] [info] 2022/08/17 22:42:30.046050 PING DATABASE mysql
[xorm] [info] 2022/08/17 22:42:30.048720 PING DATABASE mysql
time="2022-08-17T22:42:30+08:00" level=info msg="Init db mysql finish..."
[xorm] [info] 2022/08/17 22:42:30.050694 [SQL] BEGIN TRANSACTION [] - 473.68µs
[xorm] [info] 2022/08/17 22:42:30.051825 [SQL] BEGIN TRANSACTION [] - 1.596799ms
[xorm] [info] 2022/08/17 22:42:30.051985 [SQL] BEGIN TRANSACTION [] - 1.782754ms
[xorm] [info] 2022/08/17 22:42:30.052098 [SQL] BEGIN TRANSACTION [] - 1.827874ms
[xorm] [info] 2022/08/17 22:42:30.052272 [SQL] BEGIN TRANSACTION [] - 2.007615ms
[xorm] [info] 2022/08/17 22:42:30.052277 [SQL] BEGIN TRANSACTION [] - 1.883392ms
[xorm] [info] 2022/08/17 22:42:30.052333 [SQL] BEGIN TRANSACTION [] - 2.062269ms
[xorm] [info] 2022/08/17 22:42:30.052352 [SQL] BEGIN TRANSACTION [] - 2.109794ms
[xorm] [info] 2022/08/17 22:42:30.052471 [SQL] BEGIN TRANSACTION [] - 2.278203ms
[xorm] [info] 2022/08/17 22:42:30.052624 [SQL] BEGIN TRANSACTION [] - 2.31885ms
[xorm] [info] 2022/08/17 22:42:30.065664 [SQL] select * from test where name = ? [test] - 13.157778ms
0
[xorm] [info] 2022/08/17 22:42:30.065698 [SQL] select * from test where name = ? [test] - 13.066802ms
0
[xorm] [info] 2022/08/17 22:42:30.065701 [SQL] select * from test where name = ? [test] - 13.416414ms
0
[xorm] [info] 2022/08/17 22:42:30.065671 [SQL] select * from test where name = ? [test] - 13.549105ms
0
[xorm] [info] 2022/08/17 22:42:30.065739 [SQL] select * from test where name = ? [test] - 14.996209ms
0
[xorm] [info] 2022/08/17 22:42:30.065671 [SQL] select * from test where name = ? [test] - 13.825816ms
0
[xorm] [info] 2022/08/17 22:42:30.070316 [SQL] select * from test where name = ? [test] - 17.956807ms
0
[xorm] [info] 2022/08/17 22:42:30.070343 [SQL] select * from test where name = ? [test] - 18.33531ms
0
[xorm] [info] 2022/08/17 22:42:30.071286 [SQL] select * from test where name = ? [test] - 19.002789ms
0
[xorm] [info] 2022/08/17 22:42:30.071319 [SQL] select * from test where name = ? [test] - 18.939498ms
0