forked-synapse/synapse/storage
Richard van der Hoff daa1ac89a0
Fix device list update stream ids going backward (#7158)
Occasionally we could get a federation device list update transaction which
looked like:

```
[
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D2', 'prev_id': [], 'stream_id': 12, 'deleted': True}},
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D1', 'prev_id': [12], 'stream_id': 11, 'deleted': True}},
    {'edu_type': 'm.device_list_update', 'content': {'user_id': '@user:test', 'device_id': 'D3', 'prev_id': [11], 'stream_id': 13, 'deleted': True}}
]
```

Having `stream_ids` which are lower than `prev_ids` looks odd. It might work
(I'm not actually sure), but in any case it doesn't seem like a reasonable
thing to expect other implementations to support.
2020-04-03 10:40:22 +01:00
..
data_stores Fix device list update stream ids going backward (#7158) 2020-04-03 10:40:22 +01:00
engines Only import sqlite3 when type checking (#7155) 2020-03-27 13:20:00 +00:00
schema Move schema delta files to the correct data store. 2019-10-24 16:45:03 +01:00
util Update black to 19.10b0 (#6304) 2019-11-01 02:43:24 +11:00
__init__.py Move are_all_users_on_domain checks to main data store. 2019-12-06 13:43:40 +00:00
_base.py Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) 2020-02-21 07:15:07 -05:00
background_updates.py Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) 2020-02-21 07:15:07 -05:00
database.py Clean up some LoggingContext stuff (#7120) 2020-03-24 14:45:33 +00:00
keys.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
persist_events.py Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) 2020-02-21 07:15:07 -05:00
prepare_database.py Sanity-check database before running upgrades (#6982) 2020-02-25 17:46:00 +00:00
presence.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
purge_events.py Fix purge_room admin API (#6711) 2020-01-15 18:13:47 +00:00
push_rule.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
relations.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
roommember.py Move storage classes into a main "data store". 2019-10-21 16:05:06 +01:00
state.py Add StateMap type alias (#6715) 2020-01-16 13:31:22 +00:00
types.py Add some type annotations in synapse.storage (#6987) 2020-02-27 11:53:40 +00:00