EarthChen commented on code in PR #10672:
URL: https://github.com/apache/dubbo/pull/10672#discussion_r991871561


##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/BiStreamServerCallListener.java:
##########
@@ -41,13 +49,27 @@ public void onReturn(Object value) {
 
     @Override
     public void onMessage(Object message) {
-        if (message instanceof Object[]) {
-            message = ((Object[]) message)[0];
+        if (((TripleFlowControlFrame) message).getInstance() instanceof 
Object[]) {

Review Comment:
   the message is must be TripleFlowControlFrame?



##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/TripleHttp2FrameServerHandler.java:
##########
@@ -112,15 +112,18 @@ public void exceptionCaught(ChannelHandlerContext ctx, 
Throwable cause) throws E
     public void onDataRead(ChannelHandlerContext ctx, Http2DataFrame msg) 
throws Exception {
         final TripleServerStream tripleServerStream = 
ctx.channel().attr(SERVER_STREAM_KEY)
             .get();
-        tripleServerStream.transportObserver.onData(msg.content(), 
msg.isEndStream());
+        tripleServerStream.transportObserver.onData(msg, msg.isEndStream());
     }
 
     public void onHeadersRead(ChannelHandlerContext ctx, Http2HeadersFrame 
msg) throws Exception {
         TripleServerStream tripleServerStream = new 
TripleServerStream(ctx.channel(),
             frameworkModel, executor,
             pathResolver, acceptEncoding, filters);
         ctx.channel().attr(SERVER_STREAM_KEY).set(tripleServerStream);
-        tripleServerStream.transportObserver.onHeader(msg.headers(), 
msg.isEndStream());
+
+        //transmit connection to triple invoke to flowcontrol
+        Http2Connection connection = 
(Http2Connection)ctx.channel().attr(AttributeKey.valueOf("tri-connection")).get();

Review Comment:
   Change AttributeKey to a constant



##########
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/UnaryServerCallListener.java:
##########
@@ -37,11 +49,15 @@ public void onReturn(Object value) {
 
     @Override
     public void onMessage(Object message) {
-        if (message instanceof Object[]) {
-            invocation.setArguments((Object[]) message);
+        if (((TripleFlowControlFrame) message).getInstance() instanceof 
Object[]) {

Review Comment:
   same



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to