mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 14:29:23 -05:00
Don't disable autocommit
This commit is contained in:
parent
caddadfc5a
commit
5a32e9273e
@ -388,14 +388,10 @@ class DeviceInboxStore(BackgroundUpdateStore):
|
|||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _background_drop_index_device_inbox(self, progress, batch_size):
|
def _background_drop_index_device_inbox(self, progress, batch_size):
|
||||||
def reindex_txn(conn):
|
def reindex_txn(conn):
|
||||||
conn.set_session(autocommit=True)
|
txn = conn.cursor()
|
||||||
try:
|
txn.execute(
|
||||||
txn = conn.cursor()
|
"DROP INDEX IF EXISTS device_inbox_stream_id"
|
||||||
txn.execute(
|
)
|
||||||
"DROP INDEX IF EXISTS device_inbox_stream_id"
|
|
||||||
)
|
|
||||||
finally:
|
|
||||||
conn.set_session(autocommit=False)
|
|
||||||
|
|
||||||
yield self.runWithConnection(reindex_txn)
|
yield self.runWithConnection(reindex_txn)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user