[hotfix](editlog) Fix upsert replay on follower not contains loadedTableIndexIds (#26597)
Signed-off-by: Jack Drogon <jack.xsuperman@gmail.com>
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user