Skip to content

branch-4.0: [chore](http) Merge ms and recycler http skeleton #61502 #63051 #60816#63527

Open
wyxxxcat wants to merge 3 commits into
apache:branch-4.0from
wyxxxcat:pick_61502_4_0
Open

branch-4.0: [chore](http) Merge ms and recycler http skeleton #61502 #63051 #60816#63527
wyxxxcat wants to merge 3 commits into
apache:branch-4.0from
wyxxxcat:pick_61502_4_0

Conversation

@wyxxxcat
Copy link
Copy Markdown
Collaborator

wyxxxcat added 2 commits May 22, 2026 15:44
Problem Summary: Meta service and recycler maintained duplicated HTTP
parsing, routing, and config handling logic, which made it harder to
reuse handlers and keep versioned endpoints consistent. This change
extracts the shared HTTP helper layer into `cloud/src/common/
http_helper.*`, introduces role-based handler registration for
MetaService and Recycler, reuses common config show/update helpers, and
adds versioned cluster HTTP test coverage.

If you want to expand the interface version

```
{"add_cluster",
 {.handler = [](void* s, brpc::Controller* c) { return process_alter_cluster((MS*)s, c); },
  .versioned_handlers =
          {{"v2",
            [](void* s, brpc::Controller* c) {
                return process_alter_cluster_v2((MS*)s, c);
            }}},
  .role = HttpRole::META_SERVICE}},
```
…#63051)

[fix](recycler) Recycler/Ms http api result msg should set ok

Set successful Recycler/MS HTTP API messages to OK. The shared helper covers JSON/text success messages.
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@wyxxxcat
Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 61.38% (696/1134) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.48% (1845/2351)
Line Coverage 65.24% (33115/50759)
Region Coverage 65.64% (16319/24860)
Branch Coverage 56.26% (8694/15454)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants