summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2023-08-16 16:19:54 +0200
committerGitHub <noreply@github.com>2023-08-16 16:19:54 +0200
commit8c3bcea2da4939e21a99f72d6c3995186bc4b80d (patch)
treeeee47996c192118ab4f0b3af9b50de3d095fb65b /synapse/storage
parentAdd link explaining ELK stack to structured_logging.md (#16091) (diff)
downloadsynapse-8c3bcea2da4939e21a99f72d6c3995186bc4b80d.tar.xz
Rename pagination&purge locks and add comments explaining them (#16112)
Diffstat (limited to '')
-rw-r--r--synapse/storage/controllers/persist_events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/controllers/persist_events.py b/synapse/storage/controllers/persist_events.py
index 35cd1089d6..abd1d149db 100644
--- a/synapse/storage/controllers/persist_events.py
+++ b/synapse/storage/controllers/persist_events.py
@@ -45,7 +45,7 @@ from twisted.internet import defer
 from synapse.api.constants import EventTypes, Membership
 from synapse.events import EventBase
 from synapse.events.snapshot import EventContext
-from synapse.handlers.worker_lock import DELETE_ROOM_LOCK_NAME
+from synapse.handlers.worker_lock import NEW_EVENT_DURING_PURGE_LOCK_NAME
 from synapse.logging.context import PreserveLoggingContext, make_deferred_yieldable
 from synapse.logging.opentracing import (
     SynapseTags,
@@ -357,7 +357,7 @@ class EventsPersistenceStorageController:
         # it. We might already have taken out the lock, but since this is just a
         # "read" lock its inherently reentrant.
         async with self.hs.get_worker_locks_handler().acquire_read_write_lock(
-            DELETE_ROOM_LOCK_NAME, room_id, write=False
+            NEW_EVENT_DURING_PURGE_LOCK_NAME, room_id, write=False
         ):
             if isinstance(task, _PersistEventsTask):
                 return await self._persist_event_batch(room_id, task)