[BugFix] Fix partitions not refreshed when retry in refresh materailized view (#57232)

Signed-off-by: smartlxh <smartlxh@gmail.com>
Co-authored-by: lixianhai.lxh <lixianhai.lxh@alibaba-inc.com>
(cherry picked from commit e2a38297fa)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/scheduler/PartitionBasedMvRefreshProcessor.java
This commit is contained in:
fgump 2025-03-25 13:57:14 +08:00 committed by Mergify
parent cda5343971
commit a7a82f0cc5
1 changed files with 6 additions and 0 deletions

View File

@ -249,9 +249,15 @@ public class PartitionBasedMvRefreshProcessor extends BaseTaskRunProcessor {
refreshExternalTable(context, baseTableCandidatePartitions);
}
<<<<<<< HEAD
if (!Config.enable_materialized_view_external_table_precise_refresh) {
try (PlannerProfile.ScopedTimer ignored = PlannerProfile.getScopedTimer("MVRefreshSyncPartitions")) {
// sync partitions between materialized view and base tables out of lock
=======
if (!Config.enable_materialized_view_external_table_precise_refresh || retryNum > 1) {
try (Timer ignored = Tracers.watchScope("MVRefreshSyncPartitions")) {
// sync partitions between mv and base tables out of lock
>>>>>>> e2a38297fa ([BugFix] Fix partitions not refreshed when retry in refresh materailized view (#57232))
// do it outside lock because it is a time-cost operation
syncPartitions(context);
}