Do not get a new connection when retrying to lock table on transaction start
Closes #13661 (grafted from a36a983afe44fc569c04db4d3db71146400b6422) --HG-- branch : 7.0
This commit is contained in:
1 parent
02e8407f30
commit
15b80c50c0
1 file changed
+2
-2
@@ -192,12 +192,12 @@ class Transaction(object):
|
||||
self.counter = 0
|
||||
self._datamanagers = []
|
||||
|
||||
self.connection = database.get_connection(readonly=readonly,
|
||||
autocommit=autocommit)
|
||||
count = 0
|
||||
while True:
|
||||
if count:
|
||||
time.sleep(0.002 * (_retry - count))
|
||||
self.connection = database.get_connection(readonly=readonly,
|
||||
autocommit=autocommit)
|
||||
try:
|
||||
lock_tables = extras.get('_lock_tables', [])
|
||||
for table in lock_tables:
|
||||
|
||||
Reference in new issue
Block a user