Make couch_event_sup:stop/1 synchronous - #662
Merged
Merged
Conversation
Because `stop/1` is asynchronous, and casts a stop message and as result the client process could end getting killed during termination/cleanup phase if this sequence of events took place: 1. Client calls `stop(ListerPid).` 2. couch_event_sup casts a `stop` message to couch_event_sup gen_server 3. `stop` message is delayed and client continues executing. 4. Client calls something like application:stop/1`. 5. `application:stop/1` terminates couch_event_sup gen_server. 6. App termination kills client process because it is still linked. So this make the stop synchrounous by using call instead of cast. Issue apache#644
Member
|
+1 |
nickva
pushed a commit
to nickva/couchdb
that referenced
this pull request
Sep 7, 2022
Added a note regarding max_partition_size
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
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.
Because
stop/1is asynchronous, and casts a stop message and as result theclient process could end getting killed during termination/cleanup phase if
this sequence of events took place:
Client calls
stop(ListerPid).couch_event_sup casts a
stopmessage to couch_event_sup gen_serverstopmessage is delayed and client continues executing.Client calls something like application:stop/1`.
application:stop/1terminates couch_event_sup gen_server.App termination kills client process because it is still linked.
So this make the stop synchrounous by using call instead of cast.
Issue #644