incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

feature:Support HTTP/2 response handling for the Watch API in Server Raft mode

Open YvCeung opened this issue 3 weeks ago • 1 comments

Ⅰ. Describe what this PR did

This change only completes the protocol upgrade and does not include streaming push at the data frame level. HTTP/2 responses adopt the same simple response pattern as HTTP/1.1:

  1. Send the headers frame (including the status code) 2.Send an empty data frame (endStream=true) to close the stream 3.The response behavior is consistent with HTTP/1.1, with only the protocol layer being different

本次变更仅完成协议升级,不包含数据帧级别的流式推送。HTTP/2 响应采用与 HTTP/1.1 相同的简单响应模式: 发送 headers frame(包含状态码) 发送空的 data frame(endStream=true)关闭流 响应行为与 HTTP/1.1 一致,仅协议层不同

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

look it org.apache.seata.server.controller.ClusterControllerTest

Ⅴ. Special notes for reviews

YvCeung avatar Dec 01 '25 13:12 YvCeung

Codecov Report

:x: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 70.94%. Comparing base (1b2a486) to head (badde79).

Files with missing lines Patch % Lines
.../server/cluster/manager/ClusterWatcherManager.java 65.00% 5 Missing and 2 partials :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #7826      +/-   ##
============================================
+ Coverage     70.90%   70.94%   +0.03%     
- Complexity      992      994       +2     
============================================
  Files          1322     1322              
  Lines         50322    50333      +11     
  Branches       5946     5947       +1     
============================================
+ Hits          35683    35708      +25     
+ Misses        11693    11679      -14     
  Partials       2946     2946              
Files with missing lines Coverage Δ
.../server/cluster/manager/ClusterWatcherManager.java 77.41% <65.00%> (+2.90%) :arrow_up:

... and 11 files with indirect coverage changes

Impacted file tree graph

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 01 '25 14:12 codecov[bot]

After looking at the client code, I see it's still using HTTP/1.1. So does this PR only add server-side support for HTTP/2 watch responses, without any changes to the client yet?

yeah,the transformation of the client side needs to be completed by @YongGoose (#7406 )

YvCeung avatar Dec 12 '25 13:12 YvCeung

After looking at the client code, I see it's still using HTTP/1.1. So does this PR only add server-side support for HTTP/2 watch responses, without any changes to the client yet?

yeah,the transformation of the client side needs to be completed by @YongGoose (#7406 )

@funky-eyes @YvCeung It’s been a while… I’ve been really busy with work lately, so I don’t think I’ll be able to spend much time on this task. I should still be able to do reviews, though. Should we let someone else take over this issue?

YongGoose avatar Dec 12 '25 14:12 YongGoose

After looking at the client code, I see it's still using HTTP/1.1. So does this PR only add server-side support for HTTP/2 watch responses, without any changes to the client yet?

yeah,the transformation of the client side needs to be completed by @YongGoose (#7406 )

@funky-eyes @YvCeung It’s been a while… I’ve been really busy with work lately, so I don’t think I’ll be able to spend much time on this task. I should still be able to do reviews, though. Should we let someone else take over this issue?

OK,I will take over from you to continue the transformation of the client part. Thank you for your previous efforts

YvCeung avatar Dec 13 '25 07:12 YvCeung