liaoxin01 opened a new pull request, #64374:
URL: https://github.com/apache/doris/pull/64374
### What problem does this PR solve?
Related Jira: DORIS-26262
The regression case `query_p0/show/test_nereids_show_replica_dist` (run as
`nereids_p0.show.test_nereids_show_replica_dist` in the pipeline) failed in the
cloud-26.0.4 S3 P0 release regression with:
```
org.opentest4j.AssertionFailedError: expected: <3> but was: <1>
```
**Root cause** — the case is not cloud-aware:
The case reads FE config `force_olap_table_replication_num` and, when it is
`> 0` (the pipeline sets it to `3`), it expects every partition's replica count
to be `3`. This assumption only holds in non-cloud mode.
In `PropertyAnalyzer.rewriteOlapProperties()` two steps run in order:
1. `rewriteReplicaAllocationProperties()` rewrites `replication_num` to `3`
because `force_olap_table_replication_num=3`;
2. `rewriteForceProperties()` in cloud mode goes through
`CloudPropertyAnalyzer`, whose `forceProperties` unconditionally `replace`s
`replication_num` with `ReplicaAllocation.DEFAULT_ALLOCATION`, which is `new
ReplicaAllocation((short)1)` in cloud.
So step 2 overwrites the `3` from step 1 back to `1`. This is by design:
cloud uses shared storage (S3), data is stored once and each tablet always has
exactly one replica, so `force_olap_table_replication_num` must not take effect.
Pipeline log confirms it — `SHOW REPLICA DISTRIBUTION ... PARTITION p3`
returns 4 BEs with only one holding a replica (sum = 1), while the expected
value was forced to 3.
### Release note
None
### Check List (For Author)
- Test
- [x] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- Behavior changed:
- [x] No.
- [ ] Yes.
- 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]