[fix](fe) Fix SHOW BACKENDS field order mismatch#64005
Closed
HappenLee wants to merge 5 commits into
Closed
Conversation
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. Issue: - CpuCores showed NodeRole value (mix) - Memory showed CpuCores value - NodeRole showed Memory value Fix: - Reorder fields in BackendsProcDir.getBackendInfos() to match SCHEMA: CpuCores -> Memory -> LiveSince -> RunningTasks -> NodeRole - Synchronize the same fix in MetadataGenerator.backendsMetadataResult() - Add unit test to verify field order Test: Unit test added
…BackendsTest Issue Number: N/A Problem Summary: After commit d21be2b which fixed SHOW BACKENDS field order to match SCHEMA definition, the NodeRole column moved from index size-5 to size-1 (last column). The test assertion still used the old wrong offset size-5 (which now points to CpuCores returning "1"), causing the test to fail with expected:<[mix]> but was:<[1]>. None - Test: Unit test fix - updated column index to match corrected field order - Behavior changed: No - Does this need documentation: No
TITLE_NAMES must be reordered to match getBackendInfos() after NodeRole field was moved to the end. Also remove LiveSince assertion from test since branch-3.1 does not have the LiveSince column. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the output field order of
SHOW BACKENDScommand. The fields inBackendsProcDir.getBackendInfos()were out of sync with theBackendsTableValuedFunction.SCHEMAdefinition, causing incorrect column values to be displayed:mix)Changes
TITLE_NAMESandgetBackendInfos()output to match SCHEMA:CpuCores -> Memory -> RunningTasks -> NodeRoletestBackendInfoFieldOrderto verify the correct field ordersize-4tosize-1)Test plan
testBackendInfoFieldOrderverifies CpuCores < Memory < RunningTasks < NodeRole orderDemoMultiBackendsTestassertion index updated to match new field order