summary refs log tree commit diff
path: root/synapse/storage/util/sequence.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add a `get_next_txn` method to `StreamIdGenerator` to match ↵Andrew Morgan2023-03-021-1/+1
| | | | `MultiWriterIdGenerator` (#15191
* Annotate synapse.storage.util (#10892)David Robertson2021-10-081-3/+3
| | | | | Also mark `synapse.streams` as having has no untyped defs Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
* Use inline type hints in `http/federation/`, `storage/` and `util/` (#10381)Jonathan de Jong2021-07-151-3/+3
|
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Refactor to ensure we call check_consistency (#9470)Erik Johnston2021-02-241-2/+22
| | | The idea here is to stop people forgetting to call `check_consistency`. Folks can still just pass in `None` to the new args in `build_sequence_generator`, but hopefully they won't.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+1
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Update type hints for Cursor to match PEP 249. (#9299)Jonathan de Jong2021-02-051-2/+6
|
* Speed up chain cover calculation (#9176)Erik Johnston2021-01-211-0/+16
|
* Add schema update to fix existing DBs affected by #9193 (#9195)Erik Johnston2021-01-211-1/+1
|
* Fix receipts or account data not being sent down sync (#9193)Erik Johnston2021-01-211-3/+53
| | | | | Introduced in #9104 This wasn't picked up by the tests as this is all fine the first time you run Synapse (after upgrading), but then when you restart the wrong value is pulled from `stream_positions`.
* Fix chain cover background update to work with split out event persisters ↵Erik Johnston2021-01-141-4/+6
| | | | (#9115)
* Make event persisters periodically announce position over replication. (#8499)Erik Johnston2020-10-121-0/+2
| | | | | 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.
* Add logging on startup/shutdown (#8448)Erik Johnston2020-10-021-3/+12
| | | | | 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.
* Add checks for postgres sequence consistency (#8402)Erik Johnston2020-09-281-2/+88
|
* Add functions to `MultiWriterIdGen` used by events stream (#8164)Erik Johnston2020-08-251-1/+7
|
* Add some helper classes for generating ID sequencesRichard van der Hoff2020-07-161-0/+98