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

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 245e7a9ca73 branch-3.1: [fix](exception) avoid not set required field 
exception #57069 (#57086)
245e7a9ca73 is described below

commit 245e7a9ca739aa7f83f87673e3c9eabdba06568c
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Oct 20 09:51:14 2025 +0800

    branch-3.1: [fix](exception) avoid not set required field exception #57069 
(#57086)
    
    Cherry-picked from #57069
    
    Co-authored-by: Yongqiang YANG <[email protected]>
---
 .../main/java/org/apache/doris/transaction/PublishVersionDaemon.java   | 3 +++
 gensrc/thrift/AgentService.thrift                                      | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
 
b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
index 01d0197ac37..c2421bb3965 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
@@ -381,6 +381,9 @@ public class PublishVersionDaemon extends MasterDaemon {
                 Map<Long, Long> backendPartitionVersions = 
partitionVisibleVersions.entrySet().stream()
                         .filter(entry -> partitionIds.contains(entry.getKey()))
                         .collect(Collectors.toMap(Map.Entry::getKey, 
Map.Entry::getValue));
+                if (backendPartitionVersions.isEmpty()) {
+                    return;
+                }
                 UpdateVisibleVersionTask task = new 
UpdateVisibleVersionTask(backendId, backendPartitionVersions,
                         createTime);
                 batchTask.addTask(task);
diff --git a/gensrc/thrift/AgentService.thrift 
b/gensrc/thrift/AgentService.thrift
index 91658f929ea..ffc09730793 100644
--- a/gensrc/thrift/AgentService.thrift
+++ b/gensrc/thrift/AgentService.thrift
@@ -472,7 +472,7 @@ struct TPublishVersionRequest {
 }
 
 struct TVisibleVersionReq {
-    1: required map<Types.TPartitionId, Types.TVersion> partition_version
+    1: optional map<Types.TPartitionId, Types.TVersion> partition_version
 }
 
 struct TCalcDeleteBitmapPartitionInfo {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to