This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 686a1c6ebbb [fix](cloud) Update mtime only if partitions have updated 
time (#37055)
686a1c6ebbb is described below

commit 686a1c6ebbb414a80e70404140d342bd83dfdd5d
Author: Gavin Chou <gavineaglec...@gmail.com>
AuthorDate: Mon Jul 1 14:08:43 2024 +0800

    [fix](cloud) Update mtime only if partitions have updated time (#37055)
    
    This PR fix the in-compatibility introduced by #34615
---
 .../src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java
index 1246c5b640b..882bb7f6933 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/cloud/catalog/CloudPartition.java
@@ -205,7 +205,9 @@ public class CloudPartition extends Partition {
         for (int i = 0; i < size; ++i) {
             Long version = versions.get(i);
             if (version > Partition.PARTITION_INIT_VERSION) {
-                partitions.get(i).setCachedVisibleVersion(versions.get(i), 
versionUpdateTimesMs.get(i));
+                // For compatibility, the existing partitions may not have 
mtime
+                long mTime = versions.size() == versionUpdateTimesMs.size() ? 
versionUpdateTimesMs.get(i) : 0;
+                partitions.get(i).setCachedVisibleVersion(versions.get(i), 
mTime);
             }
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to