Skip to content
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

Implement an independent ChannelDuplexHandler for MergedWarpMessage #6775

Closed
funky-eyes opened this issue Aug 23, 2024 · 0 comments · Fixed by #6807
Closed

Implement an independent ChannelDuplexHandler for MergedWarpMessage #6775

funky-eyes opened this issue Aug 23, 2024 · 0 comments · Fixed by #6807
Labels
task: help-wanted Extra attention is needed

Comments

@funky-eyes
Copy link
Contributor

Why you need it?

由于MergedWarpMessage被视作单个rpcmsg,被ServerHandler直接处理,导致MergedWarpMessage在低版本,和未开启server.enableParallelRequestHandle该配置时存在队头阻塞问题,并且即便将server.enableParallelRequestHandle开启,也存在其复用forkjoinpool,并行度可能不够的问题。故应该将MergedWarpMessage消息独立实现一个ChannelDuplexHandler,将其内部的被merge的msg拿出来,复用ServerHandler逻辑进行交由业务线程进行处理,这样一来ServerOnRequestProcessor中的批量下发和并行执行逻辑就可以去除,代码可读性也得到了增强

Since MergedWarpMessage is treated as a single rpcmsg and processed directly by ServerHandler, it leads to head-of-line blocking issues in lower versions and when server.enableParallelRequestHandle is not enabled. Even if server.enableParallelRequestHandle is enabled, there may still be issues with parallelism due to the reuse of ForkJoinPool. Therefore, MergedWarpMessage should be independently implemented with a ChannelDuplexHandler. This will extract the merged messages and reuse the ServerHandler logic to be processed by business threads. Consequently, the batch dispatch and parallel execution logic in ServerOnRequestProcessor can be removed, improving code readability.

How it could be?

A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

Other related information

Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task: help-wanted Extra attention is needed
Projects
None yet
1 participant