This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Race condition with replication means that publishing room aliases lacks read-after-write consistency between workers #14210
Labels
A-Testing
Issues related to testing in complement, synapse, etc
A-Workers
Problems related to running Synapse in Worker Mode (or replication)
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Z-Read-After-Write
A lack of read-after-write consistency, usually due to cache invalidation races with workers
Consider the following sequence of events:
If the alias writes occur on a separate worker to the reads, this is vulnerable to a classic worker cache invalidation race:
I don't think actual humans edit and then immediately list aliases that often, so I suggest we don't worry about fixing this. (i.e. I think this only manifests as test flakes). But I wanted to write this up as a reference. (It would be nice to have a catalogue of known races like this).
History:
See issues labeled with Z-Read-After-WriteA lack of read-after-write consistency, usually due to cache invalidation races with workers
And previous related history specifically around aliases:
GET /rooms/:room_id/aliases lists aliases
is broken sytest#1055 this causes a broken/flakey testGET_/rooms/:room_id/aliases_lists_aliases
#14183 we notice the failures.GET /rooms/:room_id/aliases lists aliases
complement#521 readds the retry logicThe text was updated successfully, but these errors were encountered: