-
Notifications
You must be signed in to change notification settings - Fork 389
Cleanly shutdown SynapseHomeServer object #18828
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
Open
devonh
wants to merge
183
commits into
develop
Choose a base branch
from
devon/clean-shutdown
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 174 commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
7a9725c
WIP on clean shutdown of SynapseHomeServer class
devonh c283db8
More shutdown cleanup
devonh 61508a6
Temporarily disable all tests that call generate_latest
devonh df7b437
Revert "Temporarily disable all tests that call generate_latest"
devonh 5078451
Cleanup SynapseHomeServer without weakrefs
devonh 31a607a
Make clock capable of cleaning up it's own outstanding calls
devonh 144bff0
Remove unused code
devonh 5a4dd91
Merge branch 'develop' into devon/clean-shutdown
devonh 94a1bbb
Cleanup unnecessary teardown attempts
devonh fe75481
Add changelog entry
devonh aa62ad8
Address linter errors
devonh adeba65
Remove unnecessary redirect
devonh 35fc370
Add new func to MockHomeserver
devonh f26088b
Add import
devonh 287fc3c
Modify tests to shutdown homeserver on teardown
devonh a94c483
Fix type comparison
devonh 2b38ed0
Clean up batching queue metrics shutdown
devonh a316090
Add shutdown call to keyring mock
devonh 667351a
Add manhole port to shutdown list
devonh 470978a
Remove outdated TODO
devonh 35ee71a
Reintroduce code that no longer blocks clean shutdown
devonh da4aa35
Address more TODO comments
devonh ad6f02e
Reset accidental constant value change
devonh a77e41b
Cleanly shutdown metrics servers
devonh 44e48f6
Fix linter errors
devonh fa97897
Remove shutdown function override
devonh 51d0757
Refactor shutdown handler registration function
devonh 02112fa
Add args to registered shutdown handlers
devonh 60c8088
Fix formatting
devonh 42882e7
Optionally freeze gc objects at startup
devonh 7804e16
Apply formatting fixes
devonh 1bd2ad3
Remove unnecessary cleanup step
devonh 25fdddd
Revert unnecessary logic changes
devonh b980858
PR cleanup changes
devonh 4f1603d
Merge branch 'develop' into devon/clean-shutdown
devonh 25e199a
Cleanly shutdown open connections to Synapse
devonh 9607670
Update comment to reflect new variable
devonh e4233b9
Use instance_id instead of server_name
devonh 4759c55
Update comment again
devonh 947cac9
Update docstring for setup function
devonh 849a093
Move server shutdown in tests
devonh 4b67de5
Assert metrics aren't being clobbered
devonh e99f9cd
Don't renam arg
devonh 0f26d20
Use gauge.remove
devonh 649c182
Rename var for clarity
devonh 93a2183
Add field descriptions to docs
devonh 4e7ddb3
Tighten type of event trigger id
devonh 5188a78
Merge branch 'develop' into devon/clean-shutdown
devonh cc598a6
Fix linter error
devonh b697f9a
Remove background process registration
devonh 2619070
Make clock a required arg for Linearizer
devonh 35f88f4
Return None instead of raising exception
devonh 0e67230
Clarify our_server_name
devonh 1a22e8f
Rename factory arg to site
devonh 4d2e595
Add comment documenting SynapseSite shutdown
devonh a5ff83e
Add docs about using Clock instead of reactor directly
devonh 62978f1
Remove unnecessary cleanup changes
devonh a7f3948
Add TODO about shutdown freeze detection
devonh 42f3e8f
Callout full name of _FakePort in comment
devonh f00d90b
Reword SynapseProtocol docstrings
devonh 57b030d
Remove unused code
devonh ed1b436
Add comment explaining need for type ignore
devonh 7fc17a8
Update synapse/_scripts/synapse_port_db.py
devonh 27f4039
Update synapse/app/_base.py
devonh e8a145b
More docstrings
devonh 070f302
Fix linter errors
devonh 073734a
Add instance_id to docstring
devonh a53a7df
Add return docstring
devonh cb2f562
Add docstring for freeze
devonh 41734ca
Add docstring for unregister_sighups
devonh 219d002
Update synapse/app/_base.py
devonh cf10f45
Rename sighup map
devonh 7b64868
Make homeserver shutdown async
devonh 1f334ef
Move up unregister_sighups call
devonh ac8ecb1
Call hs.shutdown during tests
devonh c3856ac
Update test shutdown comment
devonh 4a6ead1
Further explain docstring args
devonh 672adc2
Fix function name
devonh 79e84eb
Update var name
devonh f814dd0
Fix incorrect servername change
devonh ccf2585
Update synapse/server.py
devonh 0c63671
Fix linter error
devonh 267da3e
Refactor clock variable names
devonh 5dce393
Remove old test
devonh 9202f50
Fully cleanup federation on shutdown
devonh 23e587f
Merge branch 'develop' into devon/clean-shutdown
devonh 9403bbd
Make clock variables instance specific
devonh 4cd3d91
Merge branch 'develop' into devon/clean-shutdown
devonh dafba10
Readd metric_name to metrics hooks
devonh da6f85e
Force shutdown handler registration to use keyword arguments
devonh a86bfe0
Remove unnecessary TODO
devonh a9df2ba
Add lint for using our internal Clock
devonh 2337b64
Change Clock to conditionally track calls for cleanup
devonh b117145
Document function arg
devonh 0301675
Readd mistakenly removed test
devonh d03ec2f
Remove delayed calls that raise
devonh 42d990d
Fully shutdown background updater
devonh d6bdce6
Add test for clean server shutdown
devonh 83be016
Add reasoning for unregister_sighups being first
devonh 169bc53
Make docstring more verbose
devonh e278d38
Update scripts-dev/mypy_synapse_plugin.py
devonh 3da4253
Fix wording
devonh 4023df9
Update scripts-dev/mypy_synapse_plugin.py
devonh fde361a
Revert log to debug
devonh 49e0df2
Update synapse/server.py
devonh 01c9de6
Remove unnecessary cleanup_metrics
devonh 4d87c26
Update synapse/server.py
devonh 996b924
Rename variable
devonh 83680f3
Update synapse/util/__init__.py
devonh ad6cdf4
Rename variable
devonh e356024
Flush out docstring
devonh e7431d0
Indent docstring
devonh 5b60064
Add docstring for delay tracking threshold
devonh a72ce6f
Update changelog.d/18828.feature
devonh 0c10de3
Update docstring for freeze arg
devonh 0337e1b
Flush out freeze comments
devonh 3fe65ab
Explain mypy ignores
devonh 6b643f2
Remove unused optional arg
devonh 2a4bae5
Add comments to call_later tracking choice
devonh 18ed2d1
Fix sleep call
devonh f3d8c17
Document calls to call_later
devonh c2d47d8
Fix call_later call cancellation
devonh 7d5f6e0
Add comment explaining lack of tracking for response cache
devonh 4636d1f
Propagate cancel_on_shutdown up to timeout_deferred
devonh 83c84a0
Make timeout_deferred use kwargs
devonh 37f9713
Extend docstring for homeserver_instance_id arg
devonh 2465c2f
Change call_later to set default cancel arg
devonh fe3491b
Switch arg default to True
devonh 5f167ff
Update synapse/notifier.py
devonh 8f57498
Refactor sighup callbacks
devonh ecb2608
Add comment to clock about lints
devonh 0bb0e6e
Update docstring
devonh 9123ec7
Update docstring
devonh 9fe95a4
Add comment explaining lack of shutdown
devonh 17d012d
Remove cast
devonh daa6c3e
Update mypy ignore comments in tests
devonh da4bdfe
Change wording of freeze docstring
devonh a1e8414
Update docstrings around using internal Clock
devonh f8a5bed
Merge branch 'develop' into devon/clean-shutdown
devonh e383758
Remove args that aren't args anymore
devonh 0ec5803
Line wrap lint errors
devonh c02f0bd
Better lint categories
devonh 075ef10
Rename lints for clarity
devonh 6cc2c2f
Update synapse/util/__init__.py
devonh 3e37d95
Update synapse/util/async_helpers.py
devonh 1c2a229
Update tests/app/test_homeserver_shutdown.py
devonh 63e096c
Move comment next to applicable arg
devonh c36aaa1
Fix lint ignore renames
devonh 490195f
Add comment about HTTP federation test
devonh 34140b3
Add arg to setup_test_homeserver for cleanup
devonh 9fd10db
Remove unused import
devonh 0bd1706
Switch test hs cleanup to use weakref
devonh 8b086c6
Return deferred from cleanup_func
devonh eb16eae
Add debugging info for shutdown test
devonh 8855f4a
Override MemoryReactor in tests for clean shutdown
devonh d0555f9
Merge branch 'develop' into devon/clean-shutdown
devonh 0f23e50
Fix test not follow Synapse logcontext rules
MadLittleMods 3f5c463
Clean up test
MadLittleMods 130dcda
Re-add call_later cancellation tracking
devonh 30dbc2b
Add shutdown test where background updates haven't completed
devonh 03b9594
Add assert that updates arent complete
devonh d7f8c1c
Initial conversion run_as_background_process to use hs
devonh 8184e9b
Merge branch 'develop' into devon/clean-shutdown
devonh b1f887c
Can't subscript Deferred in python 3.9
devonh d6d4780
Can't subscript Deferred in python 3.9
devonh 34d314b
Fix removeSystemEventTrigger in tests
devonh 527bd48
Fix postgres shutdown tests
devonh 28fdf12
Add lint for new Clock creation
devonh 50a3cd1
Lint new Clock creation
devonh 25c4ba8
Merge branch 'develop' into devon/clean-shutdown
devonh 92dba44
Switch to using hs.run_as_background_process
devonh cb699a7
Make call_later cancellation bool optional with default logic
devonh 8d05718
Fix appservice tests with wrap_as_background_process changes
devonh 751cacd
Fix registered shutdown handlers
devonh 54d2fe4
Address mypy plugin review comments
devonh 89a133e
Update lint ignore comment
devonh baa066c
Apply wording to other mypy lint codes
devonh 46e112b
Make test comments clearer
devonh f2f0bae
Address synmark review comments
devonh 3ca4e98
Remove unnecessary comment
devonh 3e92bf7
Remove unnecessary comments
devonh f39e212
Don't prevent module_api from cancelling background processes on shut…
devonh d47839e
Realy pull back untracked delayed calls
devonh 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 @@ | ||
Cleanly shutdown `SynapseHomeServer` object. |
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.
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.