mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 16:44:49 -04:00
Move the event storage into a single transaction
This commit is contained in:
parent
1379dcae6f
commit
4b2ad549d5
6 changed files with 60 additions and 48 deletions
|
@ -131,8 +131,9 @@ class RoomStore(SQLBaseStore):
|
|||
|
||||
defer.returnValue(ret)
|
||||
|
||||
def _store_room_topic(self, event):
|
||||
return self._simple_insert(
|
||||
def _store_room_topic_txn(self, txn, event):
|
||||
self._simple_insert_txn(
|
||||
txn,
|
||||
"topics",
|
||||
{
|
||||
"event_id": event.event_id,
|
||||
|
@ -141,8 +142,9 @@ class RoomStore(SQLBaseStore):
|
|||
}
|
||||
)
|
||||
|
||||
def _store_room_name(self, event):
|
||||
return self._simple_insert(
|
||||
def _store_room_name_txn(self, txn, event):
|
||||
self._simple_insert_txn(
|
||||
txn,
|
||||
"room_names",
|
||||
{
|
||||
"event_id": event.event_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue