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/11/09 04:21:49 UTC
(doris) branch master updated: [hotfix](editlog) Fix upsert replay on follower not contains loadedTableIndexIds (#26597)
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 db317841a07 [hotfix](editlog) Fix upsert replay on follower not contains loadedTableIndexIds (#26597)
db317841a07 is described below
commit db317841a07f1cca684c5fd4c0ecfbea5fcaf93b
Author: Jack Drogon <ja...@gmail.com>
AuthorDate: Thu Nov 9 12:21:43 2023 +0800
[hotfix](editlog) Fix upsert replay on follower not contains loadedTableIndexIds (#26597)
Signed-off-by: Jack Drogon <ja...@gmail.com>
---
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 d17fbc99c94..877b6cc18ea 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
@@ -530,6 +530,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 e6d266e43ee..9b123030465 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
@@ -1769,6 +1769,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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org