From a2b7102eea23572c8a3619704f5f5c3f21a8edcd Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Thu, 4 Aug 2016 20:38:08 -0700 Subject: 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,), -- cgit 1.4.1 From 1515d1b581158e98c6513cf8b3b9548787854a64 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 5 Aug 2016 10:24:23 +0100 Subject: Fallback to /state/ on both 400 and 404 --- synapse/federation/federation_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py index c5e99cebf7..7e1690b0fb 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 == 400: + if e.code == 400 or e.code == 404: logger.info("Failed to use get_room_state_ids API, falling back") else: raise e -- cgit 1.4.1 From f0fa66f495914ce3de852d498fecf9891fde118d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 5 Aug 2016 10:39:44 +0100 Subject: Delete more tables --- synapse/storage/events.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 643c3aed2a..e4dbaa3547 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -592,6 +592,11 @@ class EventsStore(SQLBaseStore): "event_search", "event_signatures", "event_to_state_groups", + "guest_access", + "history_visibility", + "local_invites", + "room_names", + "state_events", "rejections", "redactions", "room_memberships", -- cgit 1.4.1