Skip to content

[Refactor] Remove obsolete config-name prefix compatibility in BE config parsing#75352

Merged
alvin-phoenix-ai merged 1 commit into
StarRocks:mainfrom
trueeyu:remove_comp_code
Jun 25, 2026
Merged

[Refactor] Remove obsolete config-name prefix compatibility in BE config parsing#75352
alvin-phoenix-ai merged 1 commit into
StarRocks:mainfrom
trueeyu:remove_comp_code

Conversation

@trueeyu

@trueeyu trueeyu commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Why I'm doing:

What I'm doing:

It's introduced in this pr: #8406

The BE config parser (parse_key_value_pairs) carried legacy compatibility logic that stripped an obsolete name prefix from every config key before looking it up. The configs that relied on this prefix were renamed many versions ago and no longer exist in config.h, so the special-casing is dead code that adds a regex compile and a per-line regex_replace to config loading for no benefit.

This PR removes the obsolete prefix-stripping logic so the parser looks up each key by its real name directly. It also drops the now-unused <regex> include.

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
    • This pr needs auto generate documentation
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.1
    • 4.0
    • 3.5

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the BE config parsing path to remove legacy compatibility logic (stripping a doris_ prefix) and reduce overhead during config loading.

Changes:

  • Removed doris_ prefix stripping in parse_key_value_pairs, so keys are looked up by their literal names.
  • Dropped the unused <regex> include and regex-based replace logic.
  • Switched duplicate-config detection from count(...) > 0 to contains(...).

Comment thread be/src/common/configbase.cpp
@trueeyu trueeyu marked this pull request as ready for review June 25, 2026 10:25
@CelerData-Reviewer

Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 685cc337f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread be/src/common/configbase.cpp
@github-actions

Copy link
Copy Markdown
Contributor

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions

Copy link
Copy Markdown
Contributor

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

@github-actions

Copy link
Copy Markdown
Contributor

[BE Incremental Coverage Report]

pass : 1 / 1 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 be/src/common/configbase.cpp 1 1 100.00% []

@alvin-phoenix-ai alvin-phoenix-ai merged commit d018c5a into StarRocks:main Jun 25, 2026
98 of 99 checks passed
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.

4 participants