This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 3cd2d5af146 [hotfix](editlog) Fix upsert replay on follower not
contains loadedTableIndexIds (#26597) (#26756)
3cd2d5af146 is described below
commit 3cd2d5af1464d06c97f570fd56e0b277ac063861
Author: Jack Drogon <[email protected]>
AuthorDate: Fri Nov 10 22:00:48 2023 +0800
[hotfix](editlog) Fix upsert replay on follower not contains
loadedTableIndexIds (#26597) (#26756)
---
fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java | 1 +
.../main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java | 1 +
2 files changed, 2 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
index 34b8f150122..ea2e42b084e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/persist/EditLog.java
@@ -531,6 +531,7 @@ public class EditLog {
Env.getCurrentGlobalTransactionMgr().replayUpsertTransactionState(state);
LOG.debug("logid: {}, opcode: {}, tid: {}", logId, opCode,
state.getTransactionId());
+ // state.loadedTableIndexIds is updated after replay
if (state.getTransactionStatus() ==
TransactionStatus.VISIBLE) {
UpsertRecord upsertRecord = new UpsertRecord(logId,
state);
Env.getCurrentEnv().getBinlogManager().addUpsertRecord(upsertRecord);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
index 1b047258be3..afa3c9aec80 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/transaction/DatabaseTransactionMgr.java
@@ -1764,6 +1764,7 @@ public class DatabaseTransactionMgr {
tableId, transactionState.getTransactionId(),
db.getId());
continue;
}
+ transactionState.addTableIndexes(table);
for (PartitionCommitInfo partitionCommitInfo :
tableCommitInfo.getIdToPartitionCommitInfo().values()) {
long partitionId = partitionCommitInfo.getPartitionId();
long newCommitVersion = partitionCommitInfo.getVersion();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]