From 56aaa17c8efe84bb3d20d11f30071e2808587bf8 Mon Sep 17 00:00:00 2001 From: reivilibre <38398653+reivilibre@users.noreply.github.com> Date: Wed, 26 Aug 2020 20:08:51 +0100 Subject: [PATCH] Apply suggestions from Rich's code review Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- .../databases/main/schema/delta/58/11recovery_after_outage.sql | 2 +- synapse/storage/databases/main/transactions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/synapse/storage/databases/main/schema/delta/58/11recovery_after_outage.sql b/synapse/storage/databases/main/schema/delta/58/11recovery_after_outage.sql index c903419eb4..5e331cc7c6 100644 --- a/synapse/storage/databases/main/schema/delta/58/11recovery_after_outage.sql +++ b/synapse/storage/databases/main/schema/delta/58/11recovery_after_outage.sql @@ -16,7 +16,7 @@ -- after there has been a connectivity problem for any reason. -- This stores, for each (destination, room) pair, the event_id and stream_ordering --- of the latest event to be enqueued for transmission to that destination. +-- of the latest event for that destination. CREATE TABLE IF NOT EXISTS destination_rooms ( -- the destination in question destination TEXT NOT NULL, diff --git a/synapse/storage/databases/main/transactions.py b/synapse/storage/databases/main/transactions.py index 6c6f51cdd0..052dffcd1b 100644 --- a/synapse/storage/databases/main/transactions.py +++ b/synapse/storage/databases/main/transactions.py @@ -159,7 +159,7 @@ class TransactionStore(SQLBaseStore): allow_none=True, ) - if result and result["retry_last_ts"] and result["retry_last_ts"] > 0: + if result and result["retry_last_ts"]: return result else: return None