Skip to content

branch-4.1: [fix](fe) Fix SHOW BACKENDS field order mismatch #62207#62284

Open
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-62207-branch-4.1
Open

branch-4.1: [fix](fe) Fix SHOW BACKENDS field order mismatch #62207#62284
github-actions[bot] wants to merge 1 commit intobranch-4.1from
auto-pick-62207-branch-4.1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

Cherry-picked from #62207

## Summary
Fix SHOW BACKENDS command output field order mismatch with
BackendsTableValuedFunction.SCHEMA definition.

## Problem
The output fields of SHOW BACKENDS command were not in the same order as
the BackendsTableValuedFunction.SCHEMA definition, causing field values
to be displayed in wrong columns:
- CpuCores showed NodeRole value (mix)
- Memory showed CpuCores value
- NodeRole showed Memory value

## Solution
1. Reorder fields in BackendsProcDir.getBackendInfos() to match SCHEMA:
   - CpuCores -> Memory -> LiveSince -> RunningTasks -> NodeRole
2. Synchronize the same fix in
MetadataGenerator.backendsMetadataResult()
3. Add unit test to verify field order

## Test
- Unit test added in BackendsProcDirTest.testBackendInfoFieldOrder()
@github-actions github-actions bot requested a review from yiguolei as a code owner April 9, 2026 09:10
@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?

@dataroaring dataroaring closed this Apr 9, 2026
@dataroaring dataroaring reopened this Apr 9, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉
Increment coverage report
Complete coverage report

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.

3 participants