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 2023/06/20 07:48:53 UTC
[doris] branch master updated: [Bugfix](CCR) BinlogTombstone tableId is null when db disable binlog (#20995)
This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 0b1bbe4045 [Bugfix](CCR) BinlogTombstone tableId is null when db disable binlog (#20995)
0b1bbe4045 is described below
commit 0b1bbe404559262241f93574e5dc6c5ef42535e6
Author: DeadlineFen <11...@users.noreply.github.com>
AuthorDate: Tue Jun 20 15:48:47 2023 +0800
[Bugfix](CCR) BinlogTombstone tableId is null when db disable binlog (#20995)
---
.../src/main/java/org/apache/doris/binlog/BinlogTombstone.java | 8 ++++++++
fe/fe-core/src/main/java/org/apache/doris/binlog/TableBinlog.java | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogTombstone.java b/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogTombstone.java
index e1c01a5cfa..22e0fd9eba 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogTombstone.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogTombstone.java
@@ -22,6 +22,7 @@ import org.apache.doris.persist.gson.GsonUtils;
import com.google.common.collect.Maps;
import com.google.gson.annotations.SerializedName;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -57,6 +58,13 @@ public class BinlogTombstone {
this.commitSeq = commitSeq;
}
+ public BinlogTombstone(long dbId, long tableId, long commitSeq) {
+ this.dbBinlogTombstone = false;
+ this.dbId = dbId;
+ this.tableIds = Collections.singletonList(tableId);
+ this.commitSeq = commitSeq;
+ }
+
public void addTableRecord(long tableId, UpsertRecord upsertRecord) {
Map<Long, UpsertRecord.TableRecord> tableRecords = upsertRecord.getTableRecords();
UpsertRecord.TableRecord tableRecord = tableRecords.get(tableId);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/binlog/TableBinlog.java b/fe/fe-core/src/main/java/org/apache/doris/binlog/TableBinlog.java
index 659f32e6f1..47c91f2a76 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/binlog/TableBinlog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/binlog/TableBinlog.java
@@ -154,7 +154,7 @@ public class TableBinlog {
lock.writeLock().unlock();
}
- BinlogTombstone tombstone = new BinlogTombstone(dbId, largestExpiredCommitSeq);
+ BinlogTombstone tombstone = new BinlogTombstone(dbId, tableId, largestExpiredCommitSeq);
if (tombstoneUpsert != null) {
UpsertRecord upsertRecord = UpsertRecord.fromJson(tombstoneUpsert.getData());
tombstone.addTableRecord(tableId, upsertRecord);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org