Don't use ChannelMultiplexer in RPCProtocol #13980
Merged
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.
What it does
The use of a ChannelMultiplexer in
RPCProtocol
was causing the sending of request from the plugin host to be delayed until a sub-channel could be opened. This would lead to the reply for the request that caused the "callback" to the front end to be sent before the request from the plugin host.This PR removes the channel multiplexer from the
RPCProtocol
and instead just sends the proxy id as an additional parameter.Fixes #13960
Contributed on behalf of STMicroelectronics
How to test
Since this PR fixes a problem discovered in #13306, we'll need that on to be merged in order to test that the issue is actually fixed. What we can test right now, though, is that the change does not cause any trouble for the operation of plugins. This means using plugins and observing the logs, etc.
Follow-ups
The startup sequence for plugins hosts is still not entirely deterministic. Some of the ideas in #8437 would still be worth reviving in new PR, even though we don't run into any timing problems, currently.
Review checklist
Reminder for reviewers