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

bugfix: Compatible with Protobuf empty object. #1376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

imangry
Copy link

@imangry imangry commented Nov 10, 2023

Motivation:

When sending or returning a Protobuf empty object with a content length of 0,just like PagePB.Response.getDefaultInstance(), the client or server will report an error. This modification will be compatible with this situation.

03:03:00.363 [SOFA-SEV-BOLT-BIZ-12200-3-T2] ERROR c.a.s.r.c.bolt.SofaRpcSerialization - traceId=null, rpcId=null, Request deserializeContent exception, msg=Content of request is null
com.alipay.remoting.exception.DeserializationException: Content of request is null
	at com.alipay.sofa.rpc.codec.bolt.SofaRpcSerialization.deserializeContent(SofaRpcSerialization.java:273)
	at com.alipay.remoting.rpc.protocol.RpcRequestCommand.deserializeContent(RpcRequestCommand.java:148)
	at com.alipay.remoting.rpc.RpcCommand.deserialize(RpcCommand.java:117)
	at com.alipay.remoting.rpc.RpcCommand.deserialize(RpcCommand.java:138)
	at com.alipay.remoting.rpc.protocol.RpcRequestProcessor.deserializeRequestCommand(RpcRequestProcessor.java:286)
	at com.alipay.remoting.rpc.protocol.RpcRequestProcessor.doProcess(RpcRequestProcessor.java:143)
	at com.alipay.remoting.rpc.protocol.RpcRequestProcessor$ProcessTask.run(RpcRequestProcessor.java:393)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)
Exception in thread "main" com.alipay.sofa.rpc.core.exception.SofaRpcException: Failed to call org.apache.dubbo.benchmark.bean.UserServiceDubbo$IUserService.createUser on remote server bolt://127.0.0.1:12200, return null
	at com.alipay.sofa.rpc.client.FailoverCluster.doInvoke(FailoverCluster.java:81)
	at com.alipay.sofa.rpc.client.AbstractCluster.invoke(AbstractCluster.java:298)
	at com.alipay.sofa.rpc.client.ClientProxyInvoker.invoke(ClientProxyInvoker.java:83)

Copy link

sofastack-cla bot commented Nov 10, 2023

Hi @imangry, welcome to SOFAStack community, Please sign Contributor License Agreement!

After you signed CLA, we will automatically sync the status of this pull request in 3 minutes.

@sofastack-cla sofastack-cla bot added cla:no Need sign CLA First-time contributor First-time contributor size/M and removed First-time contributor First-time contributor size/M labels Nov 10, 2023
Copy link

stale bot commented Feb 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 2, 2024
@EvenLjj EvenLjj added remind To be further discussed and removed wontfix This will not be worked on labels Feb 2, 2024
@zhenjunMa zhenjunMa closed this Feb 26, 2024
@zhenjunMa zhenjunMa reopened this Feb 26, 2024
@sofastack-cla sofastack-cla bot added the cla:yes CLA is ok label Feb 26, 2024
@zhenjunMa zhenjunMa closed this Feb 26, 2024
@zhenjunMa zhenjunMa reopened this Feb 26, 2024
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 72.02%. Comparing base (1e99afb) to head (818b533).
Report is 13 commits behind head on master.

Files Patch % Lines
...ipay/sofa/rpc/codec/bolt/SofaRpcSerialization.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             master    #1376    +/-   ##
==========================================
  Coverage     72.01%   72.02%            
- Complexity      784      795    +11     
==========================================
  Files           416      422     +6     
  Lines         17661    17813   +152     
  Branches       2752     2768    +16     
==========================================
+ Hits          12719    12830   +111     
- Misses         3538     3574    +36     
- Partials       1404     1409     +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:no Need sign CLA cla:yes CLA is ok remind To be further discussed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants