This is an automated email from the ASF dual-hosted git repository.

jianliangqi 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 77855fcd43 [fix](inverted index) fix transaction id changed when light 
index change (#20302)
77855fcd43 is described below

commit 77855fcd430c9af809df656dcc8147df40592f16
Author: YueW <45946325+tany...@users.noreply.github.com>
AuthorDate: Sat Jun 3 16:05:02 2023 +0800

    [fix](inverted index) fix transaction id changed when light index change 
(#20302)
---
 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 0709f6282f..d1293484cb 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
@@ -216,8 +216,6 @@ public class IndexChangeJob implements Writable {
      */
     public synchronized void run() {
         try {
-            this.watershedTxnId = Env.getCurrentGlobalTransactionMgr()
-                    .getTransactionIDGenerator().getNextTransactionId();
             switch (jobState) {
                 case WAITING_TXN:
                     runWaitingTxnJob();
@@ -245,6 +243,8 @@ 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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to