Skip to content

[chore](http) Merge ms and recycler http skeleton - #61502

Merged
hello-stephen merged 2 commits into
apache:masterfrom
wyxxxcat:chore_ms_recycler_http
Apr 19, 2026
Merged

[chore](http) Merge ms and recycler http skeleton#61502
hello-stephen merged 2 commits into
apache:masterfrom
wyxxxcat:chore_ms_recycler_http

Conversation

@wyxxxcat

@wyxxxcatwyxxxcat commented Mar 19, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

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}},

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas

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
CollaboratorAuthor

run buildall

@wyxxxcat
wyxxxcatforce-pushed the chore_ms_recycler_http branch 2 times, most recently from f8e2b7e to 0521bc4CompareMarch 24, 2026 02:04
@wyxxxcat

Copy link
Copy Markdown
CollaboratorAuthor

run buildall

@wyxxxcat
wyxxxcatforce-pushed the chore_ms_recycler_http branch from 0521bc4 to a9b5cc1CompareApril 1, 2026 07:32
@wyxxxcat

Copy link
Copy Markdown
CollaboratorAuthor

run buildall

1 similar comment
@wyxxxcat

Copy link
Copy Markdown
CollaboratorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 60.24% (615/1021) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage77.91% (1834/2354)
Line Coverage64.36% (32465/50440)
Region Coverage65.09% (16221/24919)
Branch Coverage55.58% (8627/15522)

@wyxxxcat
wyxxxcatforce-pushed the chore_ms_recycler_http branch from cd3c674 to efdcaddCompareApril 2, 2026 02:01
@wyxxxcat

Copy link
Copy Markdown
CollaboratorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 60.24% (615/1021) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage77.91% (1834/2354)
Line Coverage64.36% (32462/50440)
Region Coverage65.07% (16214/24919)
Branch Coverage55.59% (8629/15522)

Comment threadcloud/src/common/http_helper.cpp Outdated
Comment threadcloud/src/common/configbase.cpp Outdated
@wyxxxcat
wyxxxcatforce-pushed the chore_ms_recycler_http branch 3 times, most recently from 90872fb to 6e7be19CompareApril 14, 2026 08:33
@wyxxxcat

Copy link
Copy Markdown
CollaboratorAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 59.69% (659/1104) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage77.96% (1839/2359)
Line Coverage64.53% (32862/50923)
Region Coverage65.15% (16306/25028)
Branch Coverage55.67% (8692/15614)

gavinchou
gavinchou previously approved these changes Apr 14, 2026
@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Apr 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@w41ter

Copy link
Copy Markdown
Contributor

/review

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Apr 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 61.11% (693/1134) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage78.02% (1842/2361)
Line Coverage64.61% (32924/50958)
Region Coverage65.23% (16329/25034)
Branch Coverage55.78% (8710/15616)

@gavinchou

Copy link
Copy Markdown
Contributor

/review

@github-actions

Copy link
Copy Markdown
Contributor

OpenCode automated review failed and did not complete.

Error: Review step was failure (possibly timeout or cancelled)
Workflow run: https://github.com/apache/doris/actions/runs/24625077724

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen
hello-stephen merged commit 0d771c1 into apache:masterApr 19, 2026
30 of 31 checks passed
github-actionsBot pushed a commit that referenced this pull request Apr 19, 2026
### What problem does this PR solve?
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}},
```
hello-stephen added a commit that referenced this pull request Apr 23, 2026
…62603)
Cherry-picked from #61502
Co-authored-by: Yixuan Wang <wangyixuan@selectdb.com>
Co-authored-by: Dongyang Li <lidongyang@selectdb.com>
@yiguoleiyiguolei mentioned this pull request May 20, 2026
wyxxxcat added a commit to wyxxxcat/doris that referenced this pull request May 22, 2026
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}},
```
wyxxxcat added a commit to wyxxxcat/doris that referenced this pull request May 25, 2026
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}},
```
morningman pushed a commit that referenced this pull request May 27, 2026
zhaorongsheng pushed a commit to zhaorongsheng/doris that referenced this pull request Jun 4, 2026
### What problem does this PR solve?
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}},
```
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.dev/4.0.6-mergeddev/4.1.1-mergedint/3.1.6-mergedreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@wyxxxcat@Thearas@hello-stephen@w41ter@gavinchou@morningman@yiguolei