summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-01-28 13:39:39 +0000
committerErik Johnston <erik@matrix.org>2020-01-28 13:39:39 +0000
commit33f904835ae9966e48e7815d5f7959738f7d2da0 (patch)
tree8a76abb2bb48757f0e4351fbfd57e3cee3a535a4 /synapse
parentAdd `rooms.room_version` column (#6729) (diff)
parent1.9.1 (diff)
downloadsynapse-33f904835ae9966e48e7815d5f7959738f7d2da0.tar.xz
Merge branch 'master' into develop
Diffstat (limited to 'synapse')
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/storage/data_stores/main/monthly_active_users.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py
index 6236e13aa3..a236888d3c 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -36,7 +36,7 @@ try:
 except ImportError:
     pass
 
-__version__ = "1.9.0"
+__version__ = "1.9.1"
 
 if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
     # We import here so that we don't have to install a bunch of deps when
diff --git a/synapse/storage/data_stores/main/monthly_active_users.py b/synapse/storage/data_stores/main/monthly_active_users.py
index 89a41542a3..1507a14e09 100644
--- a/synapse/storage/data_stores/main/monthly_active_users.py
+++ b/synapse/storage/data_stores/main/monthly_active_users.py
@@ -121,7 +121,13 @@ class MonthlyActiveUsersStore(MonthlyActiveUsersWorkerStore):
             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)