Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Avoid resetting state on rejected events #2025

Merged
merged 2 commits into from
Mar 20, 2017

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 17, 2017

Presented as two commits: one which is a bit of a refactorathon, but should amount to a no-op functionally speaking, and a second which actually makes the change.

@richvdh richvdh force-pushed the rav/no_reset_state_on_rejections branch from 1dd0b83 to 3fd805e Compare March 17, 2017 14:45
@erikjohnston
Copy link
Member

If we have a rejected state event that attempts to replace an older state, do we still see that older state for subsequent events?

richvdh added 2 commits March 17, 2017 15:06
A few non-functional changes:

* A bunch of docstrings to document types
* Split `EventsStore._persist_events_txn` up a bit. Hopefully it's a bit more
  readable.
* Rephrase `EventFederationStore._update_min_depth_for_room_txn` to avoid
  mind-bending conditional.
* Rephrase rejected/outlier conditional in `_update_outliers_txn` to avoid
  mind-bending conditional.
When we get a rejected event, give it the same state_group as its prev_event,
rather than no state_group at all.

This should fix #1935.
@richvdh richvdh force-pushed the rav/no_reset_state_on_rejections branch from 3fd805e to 0c01f82 Compare March 17, 2017 15:07
@richvdh
Copy link
Member Author

richvdh commented Mar 17, 2017

If we have a rejected state event that attempts to replace an older state, do we still see that older state for subsequent events?

yes.

@erikjohnston
Copy link
Member

lgtm

@richvdh richvdh assigned richvdh and unassigned erikjohnston Mar 18, 2017
@richvdh richvdh merged commit 2e05f5d into develop Mar 20, 2017
@richvdh richvdh deleted the rav/no_reset_state_on_rejections branch March 22, 2017 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants