diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py
index 142787fdfd..7f975a8f16 100644
--- a/synapse/storage/background_updates.py
+++ b/synapse/storage/background_updates.py
@@ -84,22 +84,21 @@ class BackgroundUpdater:
MINIMUM_BACKGROUND_BATCH_SIZE = 100
DEFAULT_BACKGROUND_BATCH_SIZE = 100
- BACKGROUND_UPDATE_INTERVAL_MS = 1000
- BACKGROUND_UPDATE_DURATION_MS = 100
+ # temporarily increased to make stream_ordering go faster: rv 2021/06/29
+ BACKGROUND_UPDATE_INTERVAL_MS = 10
+ BACKGROUND_UPDATE_DURATION_MS = 1000
def __init__(self, hs: "HomeServer", database: "DatabasePool"):
self._clock = hs.get_clock()
self.db_pool = database
# if a background update is currently running, its name.
- self._current_background_update = None # type: Optional[str]
-
- self._background_update_performance = (
- {}
- ) # type: Dict[str, BackgroundUpdatePerformance]
- self._background_update_handlers = (
- {}
- ) # type: Dict[str, Callable[[JsonDict, int], Awaitable[int]]]
+ self._current_background_update: Optional[str] = None
+
+ self._background_update_performance: Dict[str, BackgroundUpdatePerformance] = {}
+ self._background_update_handlers: Dict[
+ str, Callable[[JsonDict, int], Awaitable[int]]
+ ] = {}
self._all_done = False
def start_doing_background_updates(self) -> None:
@@ -411,7 +410,7 @@ class BackgroundUpdater:
c.execute(sql)
if isinstance(self.db_pool.engine, engines.PostgresEngine):
- runner = create_index_psql # type: Optional[Callable[[Connection], None]]
+ runner: Optional[Callable[[Connection], None]] = create_index_psql
elif psql_only:
runner = None
else:
|