You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/07/13 13:35:09 UTC

[GitHub] [incubator-doris] morningman opened a new pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

morningman opened a new pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088


   Cancel the alter job in WAITING_TXN state if database has been dropped
   Fix: #4087 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088#discussion_r455464635



##########
File path: fe/src/main/java/org/apache/doris/clone/TabletScheduler.java
##########
@@ -879,9 +880,14 @@ private void deleteReplicaInternal(TabletSchedCtx tabletCtx, Replica replica, St
             throw new SchedException(Status.SCHEDULE_FAILED, "set watermark txn " + nextTxnId);
         } else if (replica.getState() == ReplicaState.DECOMMISSION && replica.getWatermarkTxnId() != -1) {
             long watermarkTxnId = replica.getWatermarkTxnId();
-            if (!Catalog.getCurrentGlobalTransactionMgr().isPreviousTransactionsFinished(watermarkTxnId,
-                    tabletCtx.getDbId(), Lists.newArrayList(tabletCtx.getTblId()))) {
-                throw new SchedException(Status.SCHEDULE_FAILED, "wait txn before " + watermarkTxnId + " to be finished");
+            try {
+                if (!Catalog.getCurrentGlobalTransactionMgr().isPreviousTransactionsFinished(watermarkTxnId,
+                        tabletCtx.getDbId(), Lists.newArrayList(tabletCtx.getTblId()))) {
+                    throw new SchedException(Status.SCHEDULE_FAILED,

Review comment:
       bear it! LOL




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088#discussion_r453747057



##########
File path: fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
##########
@@ -238,17 +238,25 @@ public void finishTransaction(long dbId, long transactionId, Set<Long> errorRepl
     }
 
     /**
-     * check if there exists a load job before the endTransactionId have all finished
+     * check if there exists a load job before the endTransactionId have all

Review comment:
       ```suggestion
        * Check whether a load job already exists before checking all `TransactionId` related with this load job have finished.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088#discussion_r453747057



##########
File path: fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
##########
@@ -238,17 +238,25 @@ public void finishTransaction(long dbId, long transactionId, Set<Long> errorRepl
     }
 
     /**
-     * check if there exists a load job before the endTransactionId have all finished
+     * check if there exists a load job before the endTransactionId have all

Review comment:
       ```suggestion
        * Check whether a load job already exists before the `endTransactionId` contains all `TransactionId` related with this load job.
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #4088: [Bug][Alter] Cancel the alter job if database has been dropped

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #4088:
URL: https://github.com/apache/incubator-doris/pull/4088#discussion_r453743652



##########
File path: fe/src/main/java/org/apache/doris/clone/TabletScheduler.java
##########
@@ -879,9 +880,14 @@ private void deleteReplicaInternal(TabletSchedCtx tabletCtx, Replica replica, St
             throw new SchedException(Status.SCHEDULE_FAILED, "set watermark txn " + nextTxnId);
         } else if (replica.getState() == ReplicaState.DECOMMISSION && replica.getWatermarkTxnId() != -1) {
             long watermarkTxnId = replica.getWatermarkTxnId();
-            if (!Catalog.getCurrentGlobalTransactionMgr().isPreviousTransactionsFinished(watermarkTxnId,
-                    tabletCtx.getDbId(), Lists.newArrayList(tabletCtx.getTblId()))) {
-                throw new SchedException(Status.SCHEDULE_FAILED, "wait txn before " + watermarkTxnId + " to be finished");
+            try {
+                if (!Catalog.getCurrentGlobalTransactionMgr().isPreviousTransactionsFinished(watermarkTxnId,
+                        tabletCtx.getDbId(), Lists.newArrayList(tabletCtx.getTblId()))) {
+                    throw new SchedException(Status.SCHEDULE_FAILED,

Review comment:
       `SchedExcepition` looks so stranger...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org