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

morningman pushed a commit to branch branch-0.13
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit f4ba580e21403f2f0fab4a41bb0ad93f34983ca9
Author: caiconghui <55968745+caicong...@users.noreply.github.com>
AuthorDate: Sun Sep 13 19:13:28 2020 +0800

    [Bug]Fix bug that tablet info with wrong capacity may cause fe oom (#4567)
    
    * [Bug]Fix bug that tablet info with wrong capacity may cause fe oom
    
    * remove unused code
    
    * fix
    
    * remove empty line
    
    Co-authored-by: caiconghui [蔡聪辉] <caicong...@xiaomi.com>
---
 .../java/org/apache/doris/qe/ShowExecutor.java     | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java 
b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
index 752b37e..8347b33 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
@@ -1240,7 +1240,7 @@ public class ShowExecutor {
                 } else {
                     partitions = olapTable.getPartitions();
                 }
-                List<List<Comparable>> tableInfos =  new 
ArrayList<List<Comparable>>();
+                List<List<Comparable>> tabletInfos =  new ArrayList<>();
                 String indexName = showStmt.getIndexName();
                 long indexId = -1;
                 if (indexName != null) {
@@ -1260,18 +1260,18 @@ public class ShowExecutor {
                             continue;
                         }
                         TabletsProcDir procDir = new TabletsProcDir(db, index);
-                        tableInfos.addAll(procDir.fetchComparableResult(
+                        tabletInfos.addAll(procDir.fetchComparableResult(
                                 showStmt.getVersion(), 
showStmt.getBackendId(), showStmt.getReplicaState()));
-                        if (sizeLimit > -1 && tableInfos.size() >= sizeLimit) {
+                        if (sizeLimit > -1 && tabletInfos.size() >= sizeLimit) 
{
                             stop = true;
                             break;
                         }
                     }
                 }
-                if (sizeLimit > -1 && tableInfos.size() < sizeLimit) {
-                    tableInfos.clear();
+                if (sizeLimit > -1 && tabletInfos.size() < sizeLimit) {
+                    tabletInfos.clear();
                 } else if (sizeLimit > -1) {
-                    tableInfos = tableInfos.subList((int)showStmt.getOffset(), 
(int)sizeLimit);
+                    tabletInfos = 
tabletInfos.subList((int)showStmt.getOffset(), (int)sizeLimit);
                 }
 
                 // order by
@@ -1279,15 +1279,15 @@ public class ShowExecutor {
                 ListComparator<List<Comparable>> comparator = null;
                 if (orderByPairs != null) {
                     OrderByPair[] orderByPairArr = new 
OrderByPair[orderByPairs.size()];
-                    comparator = new 
ListComparator<List<Comparable>>(orderByPairs.toArray(orderByPairArr));
+                    comparator = new 
ListComparator<>(orderByPairs.toArray(orderByPairArr));
                 } else {
                     // order by tabletId, replicaId
-                    comparator = new ListComparator<List<Comparable>>(0, 1);
+                    comparator = new ListComparator<>(0, 1);
                 }
-                Collections.sort(tableInfos, comparator);
+                Collections.sort(tabletInfos, comparator);
 
-                for (List<Comparable> tabletInfo : tableInfos) {
-                    List<String> oneTablet = new 
ArrayList<String>(tableInfos.size());
+                for (List<Comparable> tabletInfo : tabletInfos) {
+                    List<String> oneTablet = new 
ArrayList<String>(tabletInfo.size());
                     for (Comparable column : tabletInfo) {
                         oneTablet.add(column.toString());
                     }


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

Reply via email to