From a2b7102eea23572c8a3619704f5f5c3f21a8edcd Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Thu, 4 Aug 2016 20:38:08 -0700 Subject: [PATCH] Tweak integrity error recovery to work as intended --- synapse/federation/federation_client.py | 2 +- synapse/storage/events.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index c6ed720166..c5e99cebf7 100644 --- a/synapse/federation/federation_client.py +++ b/synapse/federation/federation_client.py @@ -343,7 +343,7 @@ class FederationClient(FederationBase): defer.returnValue((pdus, auth_chain)) except HttpResponseException as e: - if e.code == 404: + if e.code == 400: logger.info("Failed to use get_room_state_ids API, falling back") else: raise e diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 340c0621cc..643c3aed2a 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -580,6 +580,7 @@ class EventsStore(SQLBaseStore): for table in ( "events", + "event_auth", "event_json", "event_content_hashes", "event_destinations", @@ -593,6 +594,8 @@ class EventsStore(SQLBaseStore): "event_to_state_groups", "rejections", "redactions", + "room_memberships", + "state_events" ): txn.executemany( "DELETE FROM %s WHERE event_id = ?" % (table,),