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/04/10 08:16:17 UTC

[GitHub] [incubator-doris] WingsGo commented on a change in pull request #3293: [Transaction]Cancel all txns whose coordinate be is down.

WingsGo commented on a change in pull request #3293: [Transaction]Cancel all txns whose coordinate be is down.
URL: https://github.com/apache/incubator-doris/pull/3293#discussion_r406655847
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/transaction/GlobalTransactionMgr.java
 ##########
 @@ -818,24 +817,26 @@ public boolean isPreviousTransactionsFinished(long endTransactionId, long dbId,
         return true;
     }
 
-    // check if there exists a intersection between the source tableId list and target tableId list
-    // if one of them is null or empty, that means that we don't know related tables in tableList,
-    // we think the two lists may have intersection for right ordered txns
+    /**
+     * check if there exists a intersection between the source tableId list and target tableId list
+     * if one of them is null or empty, that means that we don't know related tables in tableList,
+     * we think the two lists may have intersection for right ordered txns
+     */
     public boolean isIntersectionNotEmpty(List<Long> sourceTableIdList, List<Long> targetTableIdList) {
         if (CollectionUtils.isEmpty(sourceTableIdList) || CollectionUtils.isEmpty(targetTableIdList)) {
             return true;
         }
-        for (int i = 0; i < sourceTableIdList.size(); i++) {
-            for (int j = 0; j < targetTableIdList.size(); j++) {
-                if (sourceTableIdList.get(i).equals(targetTableIdList.get(j))) {
+        for (Long aLong : sourceTableIdList) {
 
 Review comment:
   done

----------------------------------------------------------------
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


With regards,
Apache Git Services

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