Skip to content

Conversation

@sgy861
Copy link

@sgy861 sgy861 commented Dec 25, 2025

What problem does this PR solve?

Issue Number: #55756

Related PR: N/A

Problem Summary:

In Cloud mode, SHOW PROC '/colocation_group/<groupId>' returns empty results even when the colocation group is stable and has valid bucket placement.

In non-cloud mode, this statement correctly shows the bucket-to-backend distribution of a colocation group. However, in Cloud mode, the proc lookup fails to resolve colocated backend IDs, resulting in no rows being returned.

This PR fixes the proc lookup logic to correctly resolve colocated backend information in Cloud mode by leveraging the cloud replica placement logic (e.g. CloudReplica#getColocatedBeId). After this fix, SHOW PROC '/colocation_group/<groupId>' behaves consistently between cloud and non-cloud environments.


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

Manual test steps

  1. Start a Cloud-mode Doris cluster with at least one available BE.

  2. Create two colocated tables with identical distribution and bucket settings:

    CREATE TABLE t1 (...) PROPERTIES ("colocate_with"="cg_test", "replication_num"="1");
    CREATE TABLE t2 (...) PROPERTIES ("colocate_with"="cg_test", "replication_num"="1");
  3. Verify the colocate group exists:

    SHOW PROC '/colocation_group';
  4. Query the colocate group distribution:

    SHOW PROC '/colocation_group/<groupId>';
  5. Confirm that bucket-to-backend mapping is returned and not empty.


  • Behavior changed:

    • No.
    • Yes.

This change only fixes missing output in Cloud mode for an existing statement. No user-facing behavior is changed beyond correcting incorrect empty results.


  • 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

@hello-stephen
Copy link
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?

@sgy861
Copy link
Author

sgy861 commented Dec 25, 2025 via email

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.

2 participants