From 2635e2319cc4e9cc1bf2f1e2c6cffb831c87cb5d Mon Sep 17 00:00:00 2001 From: meiyi Date: Wed, 2 Sep 2026 10:01:50 +0800 Subject: [PATCH] [fix](fe) Avoid redundant partition version fetch during SQL cache validation (#67125) Problem Summary: SQL cache validation fetched cloud partition versions but discarded the result, and then used the FE partition map for the actual existence check. So remove this version fetch to reduce an unnecessary Meta Service RPC. --- .../doris/common/cache/NereidsSqlCacheManager.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/cache/NereidsSqlCacheManager.java b/fe/fe-core/src/main/java/org/apache/doris/common/cache/NereidsSqlCacheManager.java index fe8f01b7254a3f..1f77f1fc29b317 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/cache/NereidsSqlCacheManager.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/cache/NereidsSqlCacheManager.java @@ -81,7 +81,6 @@ import java.lang.reflect.Field; import java.time.Duration; -import java.util.Collection; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -488,14 +487,6 @@ private IsChanged tablesOrDataChanged(Env env, SqlCacheContext sqlCacheContext) TableIf tableIf = findTableIf(env, fullTableName); if (tableIf instanceof OlapTable) { OlapTable olapTable = (OlapTable) tableIf; - Collection partitionIds = scanTable.getScanPartitions(); - try { - olapTable.getVersionInBatchForCloudMode(partitionIds); - } catch (RpcException e) { - LOG.warn("failed to get version in batch for table {}", fullTableName, e); - return IsChanged.CHANGED_AND_INVALIDATE_CACHE; - } - for (Long scanPartitionId : scanTable.getScanPartitions()) { Partition partition = olapTable.getPartition(scanPartitionId); // partition == null: is this partition truncated?