924060929 commented on code in PR #63612:
URL: https://github.com/apache/doris/pull/63612#discussion_r4490881820


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/OlapTableSqlCacheVersion.java:
##########
@@ -151,36 +152,55 @@ private static List<Long> 
getPartitionVersions(List<Partition> partitions) throw
 
     /** Check metadata first, and refresh partition dependencies when the 
table's data version changes. */
     public boolean matches(OlapTable table, long currentVersion) throws 
RpcException {
-        if (!metadataMatches(table)) {
+        List<Partition> partitions = new ArrayList<>(partitionVersions.size());

Review Comment:
   Fixed in 77a128ed5c2b710bd19834e5201d136d438d4040. `matches()` now declares 
the local before the first bounded read lock and initializes the partition list 
only after the metadata and unchanged-version checks. Both finally unlocks, 
Cloud IO outside the metadata lock, second-phase identity/schema validation and 
the validated-version update remain unchanged.
   
   The saved JDK17 compiler bytecode confirms the fast return skips this 
construction after the change; JDK ArrayList(int) also confirms positive 
capacity allocates its backing Object[]. This is artifact/control-flow 
evidence, not a measured JIT, heap, GC or throughput result. Reused existing 
semantic tests: 6 focused FE classes / 76 cases, zero failures/errors/skips, 
including 14 partition-version and 27 cache/replay cases. build.sh --fe, 
integrated Checkstyle and git diff --check pass. Only this production local 
initialization changed.



-- 
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]

Reply via email to