[fix](inverted index)fix transaction id not unique for one index change job when light index change (#21180)

This commit is contained in:
YueW
2023-06-26 19:54:05 +08:00
committed by GitHub
parent 50c1d55769
commit c19e35116b

View File

@ -124,6 +124,8 @@ public class IndexChangeJob implements Writable {
this.createTimeMs = System.currentTimeMillis();
this.jobState = JobState.WAITING_TXN;
this.watershedTxnId = Env.getCurrentGlobalTransactionMgr()
.getTransactionIDGenerator().getNextTransactionId();
}
public long getJobId() {
@ -243,8 +245,6 @@ public class IndexChangeJob implements Writable {
protected void runWaitingTxnJob() throws AlterCancelException {
Preconditions.checkState(jobState == JobState.WAITING_TXN, jobState);
this.watershedTxnId = Env.getCurrentGlobalTransactionMgr()
.getTransactionIDGenerator().getNextTransactionId();
try {
if (!isPreviousLoadFinished()) {
LOG.info("wait transactions before {} to be finished, inverted index job: {}", watershedTxnId, jobId);