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 ccd6809b2a7ef6a8af6e74fbcf6f97d0c3b4ea47
Author: walter <w41te...@gmail.com>
AuthorDate: Mon Aug 26 19:29:13 2024 +0800

    [fix](binlog) Fix NPE when recover binlogs (#39909)
    
    The field partition ID of DropPartitionInfo was added in PR:
    apache/doris#37196, the old version doesn't contain this field so it
    will be null.
---
 .../src/main/java/org/apache/doris/persist/DropPartitionInfo.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/persist/DropPartitionInfo.java 
b/fe/fe-core/src/main/java/org/apache/doris/persist/DropPartitionInfo.java
index b5b56684f1b..0138549405e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/persist/DropPartitionInfo.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/persist/DropPartitionInfo.java
@@ -82,7 +82,9 @@ public class DropPartitionInfo implements Writable {
     }
 
     public Long getPartitionId() {
-        return partitionId;
+        // the field partition ID was added in PR: apache/doris#37196, the old 
version doesn't
+        // contain this field so it will be null.
+        return partitionId == null ? -1 : partitionId;
     }
 
     public String getPartitionName() {


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

Reply via email to