This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new d9b5e929219 [fix](test) Force meta sync to avoid stale meta data on
follower fe when mv rewrite (#54296) (#54463)
d9b5e929219 is described below
commit d9b5e9292192791a61e37295ab39cdc4da510009
Author: seawinde <[email protected]>
AuthorDate: Fri Aug 8 14:38:37 2025 +0800
[fix](test) Force meta sync to avoid stale meta data on follower fe when mv
rewrite (#54296) (#54463)
### What problem does this PR solve?
pr: https://github.com/apache/doris/pull/54296
commitId: d3833e4d2060a68cc1548e9b5b40920b36272782
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] 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 <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
---
.../org/apache/doris/regression/suite/Suite.groovy | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
index 897addd6b42..b6a65d0bd35 100644
---
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
+++
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy
@@ -1897,6 +1897,7 @@ class Suite implements GroovyInterceptable {
AS ${mv_sql}
"""
waitingMVTaskFinishedByMvName(db, table_name, mv_name)
+ sql """sync;"""
}
def create_async_mv = { db, mv_name, mv_sql ->
@@ -1912,6 +1913,8 @@ class Suite implements GroovyInterceptable {
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
sql "analyze table ${db}.${mv_name} with sync;"
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
}
def create_async_partition_mv = { db, mv_name, mv_sql, partition_col ->
@@ -1928,6 +1931,8 @@ class Suite implements GroovyInterceptable {
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
sql "analyze table ${db}.${mv_name} with sync;"
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
}
// mv not part in rewrite process
@@ -1988,6 +1993,8 @@ class Suite implements GroovyInterceptable {
is_partition_statistics_ready = true) {
logger.info("query_sql = " + query_sql + ", mv_name = " + mv_name + ",
sync_cbo_rewrite = " +sync_cbo_rewrite
+ ", is_partition_statistics_ready = " +
is_partition_statistics_ready)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!is_partition_statistics_ready) {
// If partition statistics is no ready, degrade to without check
cbo chosen
mv_rewrite_success_without_check_chosen(query_sql, mv_name,
sync_cbo_rewrite)
@@ -2014,6 +2021,8 @@ class Suite implements GroovyInterceptable {
is_partition_statistics_ready = true) {
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names +
", sync_cbo_rewrite = " +sync_cbo_rewrite
+ ", is_partition_statistics_ready = " +
is_partition_statistics_ready)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!is_partition_statistics_ready) {
// If partition statistics is no ready, degrade to without check
cbo chosen
mv_rewrite_all_success_without_check_chosen(query_sql, mv_names,
sync_cbo_rewrite)
@@ -2058,6 +2067,8 @@ class Suite implements GroovyInterceptable {
is_partition_statistics_ready = true) {
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names +
", sync_cbo_rewrite = " +sync_cbo_rewrite
+ ", is_partition_statistics_ready = " +
is_partition_statistics_ready)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!is_partition_statistics_ready) {
// If partition statistics is no ready, degrade to without check
cbo chosen
mv_rewrite_any_success_without_check_chosen(query_sql, mv_names,
sync_cbo_rewrite)
@@ -2099,6 +2110,8 @@ class Suite implements GroovyInterceptable {
void mv_rewrite_all_success_without_check_chosen(query_sql, mv_names,
sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()){
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2138,6 +2151,8 @@ class Suite implements GroovyInterceptable {
void mv_rewrite_any_success_without_check_chosen(query_sql, mv_names,
sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()) {
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2176,6 +2191,8 @@ class Suite implements GroovyInterceptable {
void mv_rewrite_success_without_check_chosen(query_sql, mv_name,
sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()) {
logger.info("query_sql = " + query_sql + ", mv_name = " + mv_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2198,6 +2215,8 @@ class Suite implements GroovyInterceptable {
// sync_cbo_rewrite is the bool value which control sync mv is use cbo
based mv rewrite
void mv_rewrite_fail(query_sql, mv_name, sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()) {
logger.info("query_sql = " + query_sql + ", mv_name = " + mv_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2215,6 +2234,8 @@ class Suite implements GroovyInterceptable {
// sync_cbo_rewrite is the bool value which control sync mv is use cbo
based mv rewrite
void mv_rewrite_all_fail(query_sql, mv_names, sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()) {
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2252,6 +2273,8 @@ class Suite implements GroovyInterceptable {
// sync_cbo_rewrite is the bool value which control sync mv is use cbo
based mv rewrite
void mv_rewrite_any_fail (query_sql, mv_names, sync_cbo_rewrite =
enable_sync_mv_cost_based_rewrite()) {
logger.info("query_sql = " + query_sql + ", mv_names = " + mv_names)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
if (!sync_cbo_rewrite) {
explain {
sql("${query_sql}")
@@ -2295,6 +2318,8 @@ class Suite implements GroovyInterceptable {
"""
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
mv_rewrite_success(query_sql, mv_name, true)
}
@@ -2311,6 +2336,8 @@ class Suite implements GroovyInterceptable {
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
mv_rewrite_success_without_check_chosen(query_sql, mv_name, true)
}
@@ -2328,6 +2355,8 @@ class Suite implements GroovyInterceptable {
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
mv_rewrite_fail(query_sql, mv_name, true)
}
@@ -2343,6 +2372,8 @@ class Suite implements GroovyInterceptable {
def job_name = getJobName(db, mv_name);
waitingMTMVTaskFinished(job_name)
+ // force meta sync to avoid stale meta data on follower fe
+ sql """sync;"""
}
def scp_udf_file_to_all_be = { udf_file_path ->
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]