sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.53k stars 1.12k forks source link

method ServerStreamHelper.getServerStream cannot take ServerStream from ForwardingServerCall.SimpleForwardingServerCall #1043

Closed AlchemyDing closed 7 months ago

AlchemyDing commented 7 months ago

Describe the bug

method ServerStreamHelper.getServerStream cannot take ServerStream from ForwardingServerCall.SimpleForwardingServerCall. serverCall is usually enhanced to ForwardingServerCall.SimpleForwardingServerCall by skywalking-agent or opentelemetry-javaagent,etc.At this point, ServerCallImpl will become the delegate of SimpleForwardingServerCall. When nacos use enhancement such as opentelemetry javaagent or skywalking javaagent,etc, the server cannot connect to the client. associate issue

Expected behavior

ServerStreamHelper.getServerStream can take ServerStream from ForwardingServerCall.SimpleForwardingServerCall

Actual behavior

ServerStreamHelper.getServerStream cannot take ServerStream from ForwardingServerCall.SimpleForwardingServerCall

How to resolve

add judgement for ForwardingServerCall.SimpleForwardingServerCall

Minimal yet complete reproducer code (or GitHub URL to code)

ServerStreamHelper.getServerStream

AlchemyDing commented 7 months ago

if you think it needs to be fixed, please assign this issue to me

fengjiachun commented 7 months ago

Please feel free to make any necessary fix. Thank you. @AlchemyDing