-
Notifications
You must be signed in to change notification settings - Fork 414
Support MSC4140: Delayed events (Futures) #17326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
044f57a
Add DB schema for delayed events
AndrewFerr 82c5437
Support scheduling delayed events
AndrewFerr 645e225
Support config for maximum allowed event delay
AndrewFerr 5472588
Support updating delayed events
AndrewFerr 14cf8ec
Support listing delayed events
AndrewFerr d8e3135
Restore pending delayed events on startup
AndrewFerr f9261b9
Cancel delayed state events on state change
AndrewFerr d3ea968
Prevent race conditions in delayed event updates
AndrewFerr c34221f
Check startup delayed state events for same state
AndrewFerr f2d8144
Advertise as unstable feature
AndrewFerr d2c9ca7
Update copyright years
AndrewFerr 56c6d87
Add changelog
AndrewFerr c24c41b
Don't throw when event callback finds no event
AndrewFerr 6e382df
Increase expected db_txn_counts
AndrewFerr 7b79db0
Merge branch 'develop' into af/msc4140
AndrewFerr 8b3fb49
Merge branch 'develop' into af/msc4140
AndrewFerr 32cbacf
Validate a delayed event before scheduling it
AndrewFerr 71e8997
Start adding unit tests for delayed events
AndrewFerr fafaa03
Add comments to explain rowid / identity columns
AndrewFerr 3afa3cf
Prefix internally-used attributes with underscore
AndrewFerr b3d4d6c
Use "Params" instead of "Args" in docstrings
AndrewFerr 48d8126
Add comment to explain parent delayed events
AndrewFerr 5ce3787
Merge branch 'develop' into af/msc4140
AndrewFerr bee52bd
Use utility function for generating a fake ID
AndrewFerr 6252708
Move DB error messages to debug log
AndrewFerr b1f74a8
Remove TODO to verify delayed event contents
AndrewFerr 221e0af
Don't bother using a CRC for delay_ids
AndrewFerr 08f54ca
Assert non-negative delay; allow missing delay ID
AndrewFerr 56abbb9
Check for membership in delayed member events
AndrewFerr c4e80ad
Put colons after exception types in docstrings
AndrewFerr 99e421c
Use built-in method to check for RETURNING support
AndrewFerr 335eeb7
Properly indent comment block
AndrewFerr 21311fb
Remove support for delayed event parents
AndrewFerr 3478118
Fix comments
AndrewFerr 00217f3
Reraise the error for an invalid max delay config
AndrewFerr 90cc8b5
Don't bother handling DB key collisions
AndrewFerr 8a65c77
Move update action value check to REST layer
AndrewFerr 47b6e69
Move delay value check to REST layer
AndrewFerr e0e6802
Replace assert with a single-row update
AndrewFerr 5672d0d
Replace rowid primary key with delay ID + user ID
AndrewFerr 85cb72f
Rename delayed events store methods & txn descs
AndrewFerr 974463f
Remove delayed event from DB on cancel
AndrewFerr 05accda
Make user_localpart first column of DB key
AndrewFerr 2a9069c
Don't handle missing delays in DB lookup
AndrewFerr 57b7229
Replace running_since with send_ts and index it
AndrewFerr 4dc41dc
Remove redundant delay value check
AndrewFerr 3ce7305
Refactor max delay config
AndrewFerr be094e6
Refactor delayed event processing
AndrewFerr 2aed40b
Set delayed event origin time to its send time
AndrewFerr 235c432
Save delayed event requester's device ID
AndrewFerr b03312b
Merge branch 'develop' into af/msc4140
AndrewFerr afff231
Merge 'develop' & bump schema version
AndrewFerr 86c0e97
Merge branch 'develop' into af/msc4140
AndrewFerr 798c79e
Remove license headers on new files
AndrewFerr 186e55d
Lint
AndrewFerr a3fbdd3
Update documentation
AndrewFerr ef7284f
Fix top-level comment
AndrewFerr 92d352c
Add docstring to helper function
AndrewFerr 0ab82f5
Fix unit tests
AndrewFerr 9025922
Comment early match return on no delayed events
AndrewFerr c3ad95d
Pick a nit
AndrewFerr 1dbbb74
Remove TODO for something that's no longer needed
AndrewFerr 3e9f76f
Refactor DB logic for delayed event resetting
AndrewFerr d36c89f
Use streams to watch for state deltas
AndrewFerr e0225eb
Nitpick: rename inner function
AndrewFerr e741c56
Add/improve comments & logs
AndrewFerr 2d79506
Lint
AndrewFerr e41b5a1
Put retrieved delayed events in field for GET
AndrewFerr 94048f7
Lint imports
AndrewFerr 8e3df61
Don't use data-modifying CTE in WITH for sqlite
AndrewFerr dd3c746
Remove TODO for returning transaction IDs
AndrewFerr a60fa7f
Use attrs classes for delayed event properties
AndrewFerr 092793a
Restrict delayed events to a single worker
AndrewFerr 1d75060
Reword docstring
AndrewFerr 34ed582
On startup, wait to catch up on state changes
AndrewFerr a6cf11c
Don't expect to remember next_send_ts
AndrewFerr fb04833
Add more unit tests
AndrewFerr 0bf03ad
Merge branch 'develop' into af/msc4140
AndrewFerr 3860f75
Mention that GET /delayed_events supports workers
AndrewFerr 8ee1558
Use default ts for delayed events sent on request
AndrewFerr cbedade
Don't use attr.asdict
AndrewFerr 7ee57d8
Fix path regex for delayed_events updating
AndrewFerr 10b9dee
Fix SQL query
AndrewFerr a723f6b
Add more unit tests
AndrewFerr f32cf9c
Run Complement tests
AndrewFerr dfde3c2
Order returned delayed events by send_ts
AndrewFerr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Add initial implementation of delayed events as proposed by [MSC4140](https://github.com/matrix-org/matrix-spec-proposals/pull/4140). | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.