Tweak integrity error recovery to work as intended

pull/984/head
Benjamin Saunders 2016-08-04 20:38:08 -07:00
parent a5d7968b3e
commit a2b7102eea
2 changed files with 4 additions and 1 deletions

View File

@ -343,7 +343,7 @@ class FederationClient(FederationBase):
defer.returnValue((pdus, auth_chain)) defer.returnValue((pdus, auth_chain))
except HttpResponseException as e: except HttpResponseException as e:
if e.code == 404: if e.code == 400:
logger.info("Failed to use get_room_state_ids API, falling back") logger.info("Failed to use get_room_state_ids API, falling back")
else: else:
raise e raise e

View File

@ -580,6 +580,7 @@ class EventsStore(SQLBaseStore):
for table in ( for table in (
"events", "events",
"event_auth",
"event_json", "event_json",
"event_content_hashes", "event_content_hashes",
"event_destinations", "event_destinations",
@ -593,6 +594,8 @@ class EventsStore(SQLBaseStore):
"event_to_state_groups", "event_to_state_groups",
"rejections", "rejections",
"redactions", "redactions",
"room_memberships",
"state_events"
): ):
txn.executemany( txn.executemany(
"DELETE FROM %s WHERE event_id = ?" % (table,), "DELETE FROM %s WHERE event_id = ?" % (table,),