[chore](http) Merge ms and recycler http skeleton#61502
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
f8e2b7e to
0521bc4
Compare
|
run buildall |
0521bc4 to
a9b5cc1
Compare
|
run buildall |
1 similar comment
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
cd3c674 to
efdcadd
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
90872fb to
6e7be19
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
/review |
6e7be19 to
9951f56
Compare
|
/review |
There was a problem hiding this comment.
I found one blocking regression in the extracted HTTP helper.
Critical checkpoint conclusions:
- Goal / correctness: Partially met. The shared HTTP/router extraction mostly preserves existing routes, but
show_configno longer guarantees valid JSON output for all config values. - Minimality / focus: The change is focused on HTTP helper consolidation, although it is mechanically large.
- Concurrency / locks: No new lock-order or thread-safety issue was identified in the dispatcher/helper path.
- Lifecycle / static init: The new function-local static handler tables look safe; I did not find a cross-TU static initialization issue.
- Config / dynamic behavior: No new config items were added, but the shared config show/update path regressed response correctness for some legitimate string values.
- Compatibility: Route compatibility is mostly preserved, including legacy
v1MetaService paths. Theshow_configresponse is no longer backward-compatible once a string value contains JSON-special characters. - Parallel paths: MetaService and Recycler now share config handlers; that shared path is where the regression was introduced.
- Conditional checks: The route-version and role checks are understandable and acceptable.
- Test coverage: Version-routing tests were added, but there is still no coverage for
show_configon string configs containing JSON-special characters, which would have caught this regression. - Observability: Existing logging/status propagation is mostly preserved.
- Transaction / persistence: The reviewed change does not materially alter transaction/MoW/recycler core flows; the cloud module-specific checkpoints there appear unaffected.
- Data writes / atomicity:
update_configstill delegates to the existing persistence/update logic; I did not find a new atomicity issue there. - FE-BE variable passing: Not applicable.
- Performance: I did not identify a significant performance regression in the new routing path.
- Other issues: None beyond the blocking
show_configregression below.
Review scope note: this review was based on code inspection of the touched files; I did not run a build or test binary in the runner.
Please fix the inline issue and add coverage for the affected show_config path.
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Keep cloud config::show_config using structured JSON serialization so string-valued configs with JSON-special characters remain valid when http_json_reply reparses the payload.
### Release note
Fix /show_config so mutable string config values containing JSON-special characters are returned correctly.
### Check List (For Author)
- Test: Regression test / Unit Test / Manual test / No need to test (with reason)
- Unit Test: ./run-cloud-ut.sh --run --filter=meta_service_test:MetaServiceHttpTest.ShowConfigEscapesJsonSpecialCharacters -j 8
- Behavior changed: Yes (show_config now preserves valid JSON output for escaped string values)
- Does this need documentation: No
b8d9656 to
cbfcbbf
Compare
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
/review |
|
OpenCode automated review failed and did not complete. Error: Review step was failure (possibly timeout or cancelled) Please inspect the workflow logs and rerun the review after the underlying issue is resolved. |
### 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}},
```
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
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)