-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
messaging_service: Clear list of clients on shutdown #14632
Closed
Closed
Conversation
This file contains 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
CI state |
#14612 , re-kicking |
CI state |
@scylladb/scylla-maint , review/merge ping |
denesb
reviewed
Jul 25, 2023
When messaging_service shuts down it first sets _shutting_down to true and proceeds with stopping clients and servers. Stopping clients, in turn, is calling client.stop() on each. Setting _shutting_down is used in two places. First, when a client is stopped it may happen that it's in the middle of some operation, which may result in call to remove_error_rpc_client() and not to call .stop() for the second time it just does nothing if the shutdown flag is set (see 357c91a). Second, get_rpc_client() asserts that this flag is not set, so once shutdown started it can make sure that it will call .stop() on _all_ clients and no new ones would appear in parallel. However, after shutdown() is complete the _clients vector of maps remains intact even though all clients from it are stopped. This is not very debugging-friendly, the clients are better be removed on shutdown. fixes: scylladb#14624 Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
xemul
force-pushed
the
br-ms-unlist-clients-always
branch
from
July 25, 2023 08:32
1fcaf34
to
5a538ba
Compare
upd:
|
denesb
approved these changes
Jul 25, 2023
CI state |
patjed41
pushed a commit
to patjed41/scylladb
that referenced
this pull request
Jul 27, 2023
When messaging_service shuts down it first sets _shutting_down to true and proceeds with stopping clients and servers. Stopping clients, in turn, is calling client.stop() on each. Setting _shutting_down is used in two places. First, when a client is stopped it may happen that it's in the middle of some operation, which may result in call to remove_error_rpc_client() and not to call .stop() for the second time it just does nothing if the shutdown flag is set (see 357c91a). Second, get_rpc_client() asserts that this flag is not set, so once shutdown started it can make sure that it will call .stop() on _all_ clients and no new ones would appear in parallel. However, after shutdown() is complete the _clients vector of maps remains intact even though all clients from it are stopped. This is not very debugging-friendly, the clients are better be removed on shutdown. fixes: scylladb#14624 Signed-off-by: Pavel Emelyanov <xemul@scylladb.com> Closes scylladb#14632
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When messaging_service shuts down it first sets _shutting_down to true and proceeds with stopping clients and servers. Stopping clients, in turn, is calling client.stop() on each.
Setting _shutting_down is used in two places.
First, when a client is stopped it may happen that it's in the middle of some operation, which may result in call to remove_error_rpc_client() and not to call .stop() for the second time it just does nothing if the shutdown flag is set (see 357c91a).
Second, get_rpc_client() asserts that this flag is not set, so once shutdown started it can make sure that it will call .stop() on all clients and no new ones would appear in parallel.
However, after shutdown() is complete the _clients vector of maps remains intact even though all clients from it are stopped. This is not very debugging-friendly, the clients are better be removed on shutdown.
fixes: #14624