[fix](regression) Support forced replica golden in show create case#65543
[fix](regression) Support forced replica golden in show create case#65543shuke987 wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: The SHOW CREATE TABLE case always expected one replica even when test environments force OLAP tables to three replicas. Select the full golden matching the effective force replica configuration while preserving the existing one-replica baseline.
### Release note
None
### Check List (For Author)
- Test: Regression test
- test_show_create_table_and_views_nereids with force replica 3
- Behavior changed: No
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Review result: request changes.
I found one regression-test correctness issue: the new replica-specific SHOW CREATE TABLE goldens cover non-cloud replica 1/3 output, but the same suite still runs in cloud P0 where SHOW CREATE TABLE emits cloud-specific properties. No existing inline review thread covered this.
Checkpoint summary: the change is narrow and has no production concurrency, lifecycle, persistence, FE/BE protocol, data-write, observability, or performance impact. The tag-block iterator can safely skip the unused replica variant, and the non-cloud forced-replica paths look consistent with checked-in configs. Test coverage is incomplete because cloud P0 output is not covered by the new expected blocks. No additional user focus was provided. Static review only; I did not run builds/tests per the review prompt.
| (23, 900, 1)""" | ||
|
|
||
| qt_show "SHOW CREATE TABLE ${dbName}.${tableName}" | ||
| quickRunTest("show_initial_replica_${effectiveReplicaNum}", "SHOW CREATE TABLE ${dbName}.${tableName}") |
There was a problem hiding this comment.
This still leaves the cloud P0 run broken. cloud_p0/conf/regression-conf-custom.groovy runs group p0, and the framework adds p0 to this suite from the show_p0 directory, so the suite is selected there. In that environment cloud_unique_id makes Config.isCloudMode() true, and Env.addOlapTablePropertyInfo() emits file_cache_ttl_seconds instead of replication_allocation/min_load_replica_num for SHOW CREATE TABLE. The new show_*_replica_1/3 blocks only contain the non-cloud property list, so the first quickRunTest will compare cloud output against the non-cloud golden before reaching the later checks. Please add/select cloud-specific SHOW CREATE blocks, skip this suite in cloud mode, or normalize the properties being compared.
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
test_show_create_table_and_views_nereidscreates OLAP tables withreplication_num=1and compares the completeSHOW CREATE TABLEresult with a static golden. In test environments configured withforce_olap_table_replication_num=3, Doris correctly rewrites the effective allocation to three replicas, but the case still expects one replica and fails before reaching the remaining view, rollup, and CREATE LIKE checks.This change reads the effective forced replica configuration and selects a complete replica-specific golden for the four table-level
SHOW CREATE TABLEchecks. Both the one-replica and three-replica variants retain the full DDL comparison; unsupported forced replica values fail explicitly instead of weakening the assertion.Release note
None
Check List (For Author)
Test
Validation:
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)