fix: replace named locks with Galera-compatible row locks
This commit is contained in:
1 parent
ee07866d1c
commit
65d16c2fc6
22 files changed
+314
-365
No files matched your search
@@ -377,13 +377,8 @@ func TestIntegrationZoneCreationDelegationRace(t *testing.T) {
|
||||
go func() { a <- it.do(ctx, first) }()
|
||||
it.waitForUserLock(t, ctx, a)
|
||||
go func() { b <- it.do(ctx, second) }()
|
||||
it.waitForLock(t, ctx, b, "zone named lock", func() (bool, error) {
|
||||
var waiting bool
|
||||
// Each fixture has a separate database account. The only named
|
||||
// lock wait for that account here is on this zone.
|
||||
err := it.database.root.QueryRowContext(ctx, "SELECT EXISTS (SELECT 1 FROM information_schema.PROCESSLIST "+
|
||||
"WHERE USER = ? AND LOWER(STATE) = 'user lock')", it.database.appUser).Scan(&waiting)
|
||||
return waiting, err
|
||||
it.waitForLock(t, ctx, b, "zone row lock", func() (bool, error) {
|
||||
return it.database.rowLockWaiting(ctx, "webui_locks")
|
||||
})
|
||||
if err := gate.Commit(); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user