Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix setting mau_limit_reserved_threepids config #6793

Merged
merged 2 commits into from Jan 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/6793.bugfix
@@ -0,0 +1 @@
Fix bug where setting `mau_limit_reserved_threepids` config would cause Synapse to refuse to start.
8 changes: 7 additions & 1 deletion synapse/storage/data_stores/main/monthly_active_users.py
Expand Up @@ -121,7 +121,13 @@ def _initialise_reserved_users(self, txn, threepids):
if user_id:
is_support = self.is_support_user_txn(txn, user_id)
if not is_support:
self.upsert_monthly_active_user_txn(txn, user_id)
# We do this manually here to avoid hitting #6791
self.db.simple_upsert_txn(
txn,
table="monthly_active_users",
keyvalues={"user_id": user_id},
values={"timestamp": int(self._clock.time_msec())},
)
else:
logger.warning("mau limit reserved threepid %s not found in db" % tp)

Expand Down