forked-synapse/synapse/storage/databases/main
Andreas Rammhold e3e73e181b
Upsert redactions in case they already exists (#10343)
* Upsert redactions in case they already exists

Occasionally, in combination with retention, redactions aren't deleted
from the database whenever they are due for deletion. The server will
eventually try to backfill the deleted events and trip over the already
existing redaction events.

Switching to an UPSERT for those events allows us to recover from there
situations. The retention code still needs fixing but that is outside of
my current comfort zone on this code base.

This is related to #8707 where the error was discussed already.

Signed-off-by: Andreas Rammhold <andreas@rammhold.de>

* Also purge redactions when purging events

Previously redacints where left behind leading to backfilling issues
when the server stumbled across the already existing yet to be
backfilled redactions.

This issues has been discussed in #8707.

Signed-off-by: Andreas Rammhold <andreas@rammhold.de>
2021-07-09 11:03:02 +01:00
..
__init__.py Add a distributed lock (#10269) 2021-06-29 19:15:47 +01:00
account_data.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
appservice.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
cache.py add a cache to have_seen_event (#9953) 2021-06-01 12:04:47 +01:00
censor_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
client_ips.py Remove keylen from LruCache. (#9993) 2021-05-24 14:02:01 +01:00
deviceinbox.py Add debug logging for issue #9533 (#9959) 2021-05-11 11:04:03 +01:00
devices.py Combine LruCache.invalidate and invalidate_many (#9973) 2021-05-27 10:33:56 +01:00
directory.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
e2e_room_keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
end_to_end_keys.py Fix performance of responding to user key requests over federation (#10221) 2021-06-21 14:38:59 +01:00
event_federation.py Handle old staged inbound events (#10303) 2021-07-06 13:02:37 +01:00
event_push_actions.py Combine LruCache.invalidate and invalidate_many (#9973) 2021-05-27 10:33:56 +01:00
events_bg_updates.py ANALYZE new stream ordering column (#10326) 2021-07-07 11:56:17 +02:00
events_forward_extremities.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
events_worker.py add a cache to have_seen_event (#9953) 2021-06-01 12:04:47 +01:00
events.py Upsert redactions in case they already exists (#10343) 2021-07-09 11:03:02 +01:00
filtering.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
group_server.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
keys.py Add missing type hints to synapse.util (#9982) 2021-05-24 15:32:01 -04:00
lock.py Add a distributed lock (#10269) 2021-06-29 19:15:47 +01:00
media_repository.py Add an admin API for unprotecting local media from quarantine (#10040) 2021-05-26 11:19:47 +01:00
metrics.py Minor changes to user_daily_visits (#10324) 2021-07-08 14:27:12 +01:00
monthly_active_users.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
openid.py Convert additional databases to async/await part 2 (#8200) 2020-09-01 08:39:04 -04:00
presence.py Fix bug when running presence off master (#10149) 2021-06-11 10:27:12 +01:00
profile.py Fix deactivate a user if he does not have a profile (#10252) 2021-07-06 13:08:53 +01:00
purge_events.py Upsert redactions in case they already exists (#10343) 2021-07-09 11:03:02 +01:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
pusher.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
receipts.py Combine LruCache.invalidate and invalidate_many (#9973) 2021-05-27 10:33:56 +01:00
registration.py MSC2918 Refresh tokens implementation (#9450) 2021-06-24 14:33:20 +01:00
rejections.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
relations.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
room.py Integrate knock rooms with the public rooms directory (#9359) 2021-06-09 20:31:31 +01:00
roommember.py Fix incorrect time magnitude on delayed call (#10195) 2021-06-17 15:04:26 +01:00
search.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
signatures.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state_deltas.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
state.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
stats.py Remove functionality associated with unused historical stats tables (#9721) 2021-07-08 16:57:13 +01:00
stream.py Remove synapse.types.Collection (#9856) 2021-04-22 16:43:50 +01:00
tags.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
transactions.py Don't hammer the database for destination retry timings every ~5mins (#10036) 2021-05-21 17:57:08 +01:00
ui_auth.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
user_directory.py Use get_current_users_in_room from store and not StateHandler (#9910) 2021-05-05 16:49:34 +01:00
user_erasure_store.py Minor @cachedList enhancements (#9975) 2021-05-14 11:12:36 +01:00