beiwei30 commented on issue #2116: Two dubbo calls, kryo serialization 
failed(大神们帮忙看下吧,着急使用)
URL: 
https://github.com/apache/incubator-dubbo/issues/2116#issuecomment-412010041
 
 
   I could reproduce the issue. If the optimizer is not globally known and kept 
consistent to all participated parties, then the serialization exception gets 
happen, for example:
   
   ```
   service-a (registered with optimizer 1) -> service-b (registered with 
optimizer 1 + 3) -> service-c (registered with optimizer 3)
   ```
   
   In order to solve the issue, optimizer must be registered on service level, 
which in fact disobeys the current design. One particular serialization 
optimizer must be bound together with serialization mode onto a protocol 
definition, for example:
   
   ```xml
   <dubbo:protocol name="dubbo" host="${server.host}" server="netty4" 
port="${server.port}" serialization="kryo" 
optimizer="foo.SerializationOptimizerImpl"/>
   ```
   
   Because of this, I will simply close this issue and mark it as 'will not 
fix'. What I suggest to work around this particular situation is to provide the 
same optimizer implementation among your services, or not to use optimizer at 
all.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to