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.
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
cluster: destroy on main thread #14954
cluster: destroy on main thread #14954
Changes from all commits
b474d23
7b933b1
65ed52e
df9beaa
3af5aac
b647d0c
8c6266d
d8d639c
564b17a
8e380ce
bcad62e
50ec141
4746d53
0ca27ec
ec6eb4a
2f26bf4
63b063a
75c257a
dd4b151
968a611
d4dc8f8
ea86eb1
187179b
7782047
16e1aca
cf64576
40f2530
a5c2c3c
30c9751
13379da
cc0f944
8680fa7
5af6d37
93e0b0f
31fc603
f9cd68f
01a6557
eb01989
32381e6
19309cb
2d603b8
171b6d4
d1bb2d5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ASSERT doesn't make sense for dispatchers that are deleted without calling shutdown first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. But we should enforce the shutdown(). Otherwise, a benign deferred deleted could insert new dispatch thread local obj to dispatcher, and vice versa. In
~dispatcher
the obj list are destroyed instead ofclear
in shutdown.We don't see the above failure because the connection-host-cluster-sslctx destroy chain is straightforward. IHMO dispatcher should call shutdown() to prevent itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be illegal to have objects deleted by deferred delete to schedule deferred deletions. Of course, that's not enforced today. You're uncovering a lot of issues in the dispatcher interface that will take some time to fully resolve. It may be worth documenting them in separate issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is too good to be true. There might be cascading deletion. I encountered this in listener (deferred) deletion and the connection attached to that listener. I almost introduced the third deferred delete in between.
I cannot resolve it for now but let me create a separate issue to track this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is for me to fix. File an issue and send it my way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create #15111 to track
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to set "shutdown_called_ = true;" at the top of the shutdown method. I guess I can make that change as part of #15072
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes or no.
We should flip shutdown_called_ to true only if we are confident no more delete/post. However, at the begining of the shutdown(), deferred delete could call deleteInDispatcherThread().
Below is the over complicated version of shutdown() IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into it as part of the followup issues.