summary refs log tree commit diff
path: root/jenkins.sh
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2015-11-10 18:27:23 +0000
committerRichard van der Hoff <richard@matrix.org>2015-11-13 10:39:09 +0000
commitfddedd51d9ca44f385d412e8c2e3e8d99325ba67 (patch)
tree76ca546f99c26540cc8a50122a149ab64c0c0228 /jenkins.sh
parentMake handlers.sync return a state dictionary, instead of an event list. (diff)
downloadsynapse-fddedd51d9ca44f385d412e8c2e3e8d99325ba67.tar.xz
Fix a few race conditions in the state calculation
Be a bit more careful about how we calculate the state to be returned by
/sync. In a few places, it was possible for /sync to return slightly later
state than that represented by the next_batch token and the timeline. In
particular, the following cases were susceptible:

* On a full state sync, for an active room
* During a per-room incremental sync with a timeline gap
* When the user has just joined a room. (Refactor check_joined_room to make it
  less magical)

Also, use store.get_state_for_events() (and thus the existing stategroups) to
calculate the state corresponding to a particular sync position, rather than
state_handler.compute_event_context(), which recalculates from first principles
(and tends to miss some state).

Merged from PR https://github.com/matrix-org/synapse/pull/372
Diffstat (limited to 'jenkins.sh')
0 files changed, 0 insertions, 0 deletions