- Nov 17, 2020
-
-
Erik Johnston authored
-
- Nov 16, 2020
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
Richard van der Hoff authored
Some tests want to set some custom HTTP request headers, so provide a way to do that before calling requestReceived().
-
- Oct 29, 2020
-
-
Erik Johnston authored
We do it this way round so that only the "owner" can delete the access token (i.e. `/logout/all` by the "owner" also deletes that token, but `/logout/all` by the "target user" doesn't). A future PR will add an API for creating such a token. When the target user and authenticated entity are different the `Processed request` log line will be logged with a: `{@admin:server as @bob:server} ...`. I'm not convinced by that format (especially since it adds spaces in there, making it harder to use `cut -d ' '` to chop off the start of log lines). Suggestions welcome.
-
- Oct 27, 2020
-
-
Dan Callahan authored
This allows trailing commas in multi-line arg lists. Minor, but we might as well keep our formatting current with regard to our minimum supported Python version. Signed-off-by:
Dan Callahan <danc@element.io>
-
- Oct 26, 2020
- Oct 22, 2020
-
-
Erik Johnston authored
-
- Oct 21, 2020
-
-
Richard van der Hoff authored
-
- Oct 15, 2020
-
-
Will Hunt authored
Optionally sends typing, presence, and read receipt information to appservices.
-
- Oct 14, 2020
-
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
Richard van der Hoff authored
-
- Oct 13, 2020
-
-
Richard van der Hoff authored
Update `EventCreationHandler.create_event` to accept an auth_events param, and use it in `_locally_reject_invite` instead of reinventing the wheel.
-
- Oct 12, 2020
-
-
Erik Johnston authored
Currently background proccesses stream the events stream use the "minimum persisted position" (i.e. `get_current_token()`) rather than the vector clock style tokens. This is broadly fine as it doesn't matter if the background processes lag a small amount. However, in extreme cases (i.e. SyTests) where we only write to one event persister the background processes will never make progress. This PR changes it so that the `MultiWriterIDGenerator` keeps the current position of a given instance as up to date as possible (i.e using the latest token it sees if its not in the process of persisting anything), and then periodically announces that over replication. This then allows the "minimum persisted position" to advance, albeit with a small lag.
-
- Oct 07, 2020
-
-
Erik Johnston authored
We call `_update_stream_positions_table_txn` a lot, which is an UPSERT that can conflict in `REPEATABLE READ` isolation level. Instead of doing a transaction consisting of a single query we may as well run it outside of a transaction.
-
Erik Johnston authored
We call `_update_stream_positions_table_txn` a lot, which is an UPSERT that can conflict in `REPEATABLE READ` isolation level. Instead of doing a transaction consisting of a single query we may as well run it outside of a transaction.
-
- Oct 02, 2020
-
-
Erik Johnston authored
This is so we can tell what is going on when things are taking a while to start up. The main change here is to ensure that transactions that are created during startup get correctly logged like normal transactions.
-
- Sep 30, 2020
-
-
Erik Johnston authored
The idea is that in future tokens will encode a mapping of instance to position. However, we don't want to include the full instance name in the string representation, so instead we'll have a mapping between instance name and an immutable integer ID in the DB that we can use instead. We'll then do the lookup when we serialize/deserialize the token (we could alternatively pass around an `Instance` type that includes both the name and ID, but that turns out to be a lot more invasive).
-
Richard van der Hoff authored
This was a bit unweildy for what I wanted: in particular, I wanted to assign each measurement straight into a bucket, rather than storing an intermediate Counter which didn't do any bucketing at all. I've replaced it with something that is hopefully a bit easier to use. (I'm not entirely sure what the difference between a HistogramMetricFamily and a GaugeHistogramMetricFamily is, but given our counters can go down as well as up the latter *sounds* more accurate?)
-
- Sep 29, 2020
-
-
Erik Johnston authored
-
Erik Johnston authored
* Fix table scan of events on worker startup. This happened because we assumed "new" writers had an initial stream position of 0, so the replication code tried to fetch all events written by the instance between 0 and the current position. Instead, set the initial position of new writers to the current persisted up to position, on the assumption that new writers won't have written anything before that point. * Consider old writers coming back as "new". Otherwise we'd try and fetch entries between the old stale token and the current position, even though it won't have written any rows. Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by:
Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
-
Will Hunt authored
This is an attempt to fix #8403.
-
- Sep 28, 2020
-
-
Erik Johnston authored
-
- Sep 24, 2020
-
-
Erik Johnston authored
On startup `MultiWriteIdGenerator` fetches the maximum stream ID for each instance from the table and uses that as its initial "current position" for each writer. This is problematic as a) it involves either a scan of events table or an index (neither of which is ideal), and b) if rows are being persisted out of order elsewhere while the process restarts then using the maximum stream ID is not correct. This could theoretically lead to race conditions where e.g. events that are persisted out of order are not sent down sync streams. We fix this by creating a new table that tracks the current positions of each writer to the stream, and update it each time we finish persisting a new entry. This is a relatively small overhead when persisting events. However for the cache invalidation stream this is a much bigger relative overhead, so instead we note that for invalidation we don't actually care about reliability over restarts (as there's no caches to invalidate) and simply don't bother reading and writing to the new table in that particular case.
-
- Sep 23, 2020
-
-
Erik Johnston authored
This will allow us to hit the DB after we've finished using the generated stream ID.
-
- Sep 18, 2020
-
-
Patrick Cloke authored
This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
-
- Sep 08, 2020
-
-
Erik Johnston authored
It did not correctly handle IDs finishing being persisted out of order, resulting in the `current_position` lagging until new IDs are persisted.
-
Patrick Cloke authored
-
- Sep 04, 2020
-
-
Patrick Cloke authored
-
- Sep 02, 2020
-
-
Brendan Abolivier authored
-
- Sep 01, 2020
-
-
Erik Johnston authored
This is so that we can use it for the backfill events stream.
-
- Aug 28, 2020
-
-
Richard van der Hoff authored
... and to show that it does something slightly different to `_get_e2e_device_keys_txn`. `include_all_devices` and `include_deleted_devices` were never used (and `include_deleted_devices` was broken, since that would cause `None`s in the result which were not handled in the loop below. Add some typing too.
-
- Aug 27, 2020
-
-
Patrick Cloke authored
-
Patrick Cloke authored
-
Patrick Cloke authored
-
Erik Johnston authored
This was forgotten in #8164.
-
Patrick Cloke authored
-
Patrick Cloke authored
-