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
commit 44280038bd0181e66654d6f44fba89bb465b0ba9 Author: YueW <[email protected]> AuthorDate: Mon Jun 26 19:54:05 2023 +0800 [fix](inverted index)fix transaction id not unique for one index change job when light index change (#21180) --- fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java b/fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java index d1293484cb..fecfe4b99b 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/alter/IndexChangeJob.java @@ -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); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
