dendrite/syncapi/consumers
kegsay b3162755a9
bugfix: fix race condition when updating presence via /sync (#2470)
* bugfix: fix race condition when updating presence via /sync

Previously when presence is updated via /sync, we would send the presence update
asyncly via NATS. This created a race condition:
 - If the presence update is processed quickly, the /sync which triggered the presence
   update would see an online presence.
 - If the presence update was processed slowly, the /sync which triggered the presence
   update would see an offline presence.

This is the root cause behind the flakey sytest: 'User sees their own presence in a sync'.

The fix is to ensure we update the database/advance the stream position synchronously
for local users.

* Bugfix for test
2022-05-17 15:53:08 +01:00
..
clientapi.go Add possibility to ignore users (#2329) 2022-04-07 15:08:19 +01:00
keychange.go syncapi: define specific interfaces for internal HTTP communications (#2416) 2022-05-05 09:56:03 +01:00
presence.go bugfix: fix race condition when updating presence via /sync (#2470) 2022-05-17 15:53:08 +01:00
receipts.go Remove eduserver (#2306) 2022-03-29 14:14:35 +02:00
roomserver.go Don't store invites in sync API that aren't relevant to local users (#2439) 2022-05-09 16:25:22 +01:00
sendtodevice.go Remove eduserver (#2306) 2022-03-29 14:14:35 +02:00
typing.go Remove eduserver (#2306) 2022-03-29 14:14:35 +02:00
userapi.go Per-room consumers (#2293) 2022-03-23 10:20:18 +00:00