anonymousland-synapse/synapse/storage/databases/main/schema/delta
Erik Johnston 52a50e8686
Use vector clocks for room stream tokens. (#8439)
Currently when using multiple event persisters we (in the worst case) don't tell clients about events until all event persisters have persisted new events after the original event. This is a suboptimal, especially if one of the event persisters goes down.

To handle this, we encode the position of each event persister in the room tokens so that we can send events to clients immediately. To reduce the size of the token we do two things:

1. We create a unique immutable persistent mapping between instance names and a generated small integer ID, which we can encode in the tokens instead of the instance name; and
2. We encode the "persisted upto position" of the room token and then only explicitly include instances that have positions strictly greater than that.

The new tokens look something like: `m3478~1.3488~2.3489`, where the first number is the min position, and the subsequent `-` separated pairs are the instance ID to positions map. (We use `.` and `~` as separators as they're URL safe and not already used by `StreamToken`).
2020-10-07 15:15:33 +01:00
..
12 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
13 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
14 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
15 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
16 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
17 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
18 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
19 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
20 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
21 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
22 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
24 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
25 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
26 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
27 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
28 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
29 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
30 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
31 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
32 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
33 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
34 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
35 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
36 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
37 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
38 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
39 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
40 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
41 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
42 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
43 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
44 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
45 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
46 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
47 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
48 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
49 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
50 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
51 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
52 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
53 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
54 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
55 Rename database classes to make some sense (#8033) 2020-08-05 21:38:57 +01:00
56 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
57 Add logging on startup/shutdown (#8448) 2020-10-02 15:20:45 +01:00
58 Use vector clocks for room stream tokens. (#8439) 2020-10-07 15:15:33 +01:00