diff options
author | Erik Johnston <erik@matrix.org> | 2020-10-26 15:02:55 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-10-26 15:02:55 +0000 |
commit | ff7f0e8a143656eed10ad55904849908f0799b29 (patch) | |
tree | 5b387d4ac1855c171830b06711ad91dc6ac24e13 /synapse/storage/databases/main | |
parent | Fix get|set_type_stream_id_for_appservice store functions (#8648) (diff) | |
parent | Fix get|set_type_stream_id_for_appservice store functions (#8648) (diff) | |
download | synapse-ff7f0e8a143656eed10ad55904849908f0799b29.tar.xz |
Merge branch 'release-v1.22.0' into develop
Diffstat (limited to 'synapse/storage/databases/main')
-rw-r--r-- | synapse/storage/databases/main/metrics.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/databases/main/metrics.py b/synapse/storage/databases/main/metrics.py index 79b01d16f9..ab18cc4d79 100644 --- a/synapse/storage/databases/main/metrics.py +++ b/synapse/storage/databases/main/metrics.py @@ -282,9 +282,10 @@ class ServerMetricsStore(EventPushActionsWorkerStore, SQLBaseStore): now = self._clock.time_msec() # A note on user_agent. Technically a given device can have multiple - # user agents, so we need to decide which one to pick. We could have handled this - # in number of ways, but given that we don't _that_ much have gone for MAX() - # For more details of the other options considered see + # user agents, so we need to decide which one to pick. We could have + # handled this in number of ways, but given that we don't care + # _that_ much we have gone for MAX(). For more details of the other + # options considered see # https://github.com/matrix-org/synapse/pull/8503#discussion_r502306111 sql = """ INSERT INTO user_daily_visits (user_id, device_id, timestamp, user_agent) @@ -299,7 +300,7 @@ class ServerMetricsStore(EventPushActionsWorkerStore, SQLBaseStore): WHERE last_seen > ? AND last_seen <= ? AND udv.timestamp IS NULL AND users.is_guest=0 AND users.appservice_id IS NULL - GROUP BY u.user_id, u.device_id, u.user_agent + GROUP BY u.user_id, u.device_id """ # This means that the day has rolled over but there could still |