sgy861 opened a new pull request, #59350:
URL: https://github.com/apache/doris/pull/59350
### What problem does this PR solve?
Issue Number: close #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 <!-- At least one of them must be included. -->
* [ ] Regression test
* [x] Unit Test
* [x] 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:
```sql
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:
```sql
SHOW PROC '/colocation_group';
```
4. Query the colocate group distribution:
```sql
SHOW PROC '/colocation_group/<groupId>';
```
5. Confirm that bucket-to-backend mapping is returned and not empty.
---
* Behavior changed:
* [x] 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?
* [x] No.
* [ ] Yes.
---
### Check List (For Reviewer who merge this PR)
* [ ] Confirm the release note
* [ ] Confirm test cases
* [ ] Confirm document
* [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]