-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Some problems with dubbo-cluster rpc merger #2926
Comments
1, The ArrayMerger uses its first element's component type to create a new Array. But some times
This will fail with "array element type mismatch" It can work well, but it is not right. As the source code said:
It will get the first param's type as parameter, I think you should keep the same type for the merge type. And it is not used by another module, so it is internal used api. 2, The ArrayMerger doesn't allow null object , but ListMerger and MapMerger allows user to input
this is not semantic consistent. I think you can commit a pr to make the ArrayMerge receive the null parameter, but it still should be ignored when null parameter is inputed at the runtime. 3, All the mergers doesn't check for null input and MergeFactory.getmerger could return null As above said, it is designed for internal use, so it do not have perfect logic, if you think it need be optimized, you can try to commit a pr . |
@cvictory , I also think the origin one works well , but this may be a good practice for me while I'm learning and I can do something for it , thanks . By the way , is it used by Consumer or it is only internal use ? I see some blogs' description of merger, and it says it can be configured to be used by consumers to aggregate results . |
hi, @luchy0120 If you have any ideas for improvement, I guess you could submit a proposal via email to community and then we discuss it, complete it. |
hi , @kimmking , I'm trying to join the email , but failed . May be I should try agian . |
@luchy0120 pls. follow this guide to subscribe to Dubbo mailing list. |
Hello, dubbo team. I'm learning the dubbo project , and I found some problems with rpc.merger module
listed as below:
1, The ArrayMerger uses its first element's component type to create a new Array. But some times
if we use
This will fail with "array element type mismatch"
2, The ArrayMerger doesn't allow null object , but ListMerger and MapMerger allows user to input
null object
this is not semantic consistent
3, All the mergers doesn't check for null input and MergeFactory.getmerger could return null
if the request class not in cache.
The text was updated successfully, but these errors were encountered: