You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/07/02 09:03:16 UTC
(doris) 16/44: [fix](cloud) Update mtime only if partitions have updated time (#37055)
This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 0c7dbe46a6d6246e2c8673ff771ea46647052c8e
Author: Gavin Chou <ga...@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-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org