-
Notifications
You must be signed in to change notification settings - Fork 211
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
refactor(client): remove manual client arc counting #4484
Conversation
85223bf
to
aa30514
Compare
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 in total the PR is good, just one intermediately broken commit.
Fundamentally we can't rely on database count to detect when client executors (state machines and recoveries) finished, because external user might hold some references too. Also, we must not be dropping `inner : Arc<Client>` before we ensure executors stopped, because something running in them might still require that `Arc<Client>` is alive and weak references to them can be upgraded. Instead use the old and (somewhat) trusted TaskGroup to do the job.
aa30514
to
d068ad5
Compare
Use two levels of `Arc` instead. While at it, rename and document things better.
d068ad5
to
3f4f585
Compare
Fixed at first, but then decided to squash the 3 last commits, as it doesn't help anything to have a commit with a problem. |
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.
tACK
On top of #4482
Use two levels of
Arc
instead. While at it, rename and document thingsbetter.