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

Commit 47eccd0

Browse files
committed
Fix aggregation query offset
1 parent 48d8ec8 commit 47eccd0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

synapse/storage/databases/main/beeper.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ def aggregate_txn(txn: LoggingTransaction) -> None:
178178
event_stream_ordering > (
179179
SELECT event_stream_ordering FROM beeper_user_notification_counts_stream_ordering
180180
)
181-
-- Arbitrary 100k offset for now
182-
AND event_stream_ordering < SELECT MAX(stream_ordering) - 100000 FROM events
181+
AND event_stream_ordering < (
182+
-- Arbitrary 100k offset for now
183+
SELECT MAX(stream_ordering) - 100000 FROM events
184+
)
183185
)
184186
UPDATE
185187
beeper_user_notification_counts AS epc

0 commit comments

Comments
 (0)