[Distributed] make finalizer messages threadsafe#42240
Conversation
|
Tentatively marking backport-1.7, given the issue this patch targets has been observed on 1.7 previously. |
|
Looks like this would be vulnerable to a lock priority inversion deadlock situation |
5f562fd to
f8b7064
Compare
|
Would using a lock-free queue, stack, or "channel" for the messages help here? It sounds nice to not block and do minimal work inside a finalizer. (You can always |
Yeah that would be a good optimization, but I don't think we have that in base right now? But even with a lock-free queue, notifying the consumer is a problem. |
|
For a queue with notification, we can use a lock-free unbounded "channel" (aka dual queue). It's possible to implement lock-free(-ish) Footnotes
|
|
@KristofferC I would like to let this bake on master for a while before backporting. Should I remove the tag until a week or two from now? |
|
Sounds good. |
(cherry picked from commit eb1d6b3)
|
Is this backportable to 1.6? We are experiencing #42126 (with the old error type) there. |
(cherry picked from commit f3e4ef5)
Partial revert of #41722
Fixes #42126