[fix](binlog) Fix NPE when recover binlogs (#39909) (#39910)

Cherry-pick #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.
This commit is contained in:
walter
2024-08-26 20:17:26 +08:00
committed by GitHub
parent a6e485e54f
commit fb5002d723

View File

@ -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() {