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

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


The following commit(s) were added to refs/heads/master by this push:
     new ab05992  [Bug] catch IllegalArgumentException in 
DynamicPartitionScheduler (#4613)
ab05992 is described below

commit ab059928c826952039b048ae45a88eb959b5fc5b
Author: HuangWei <huang...@apache.org>
AuthorDate: Sun Sep 20 20:55:20 2020 +0800

    [Bug] catch IllegalArgumentException in DynamicPartitionScheduler (#4613)
---
 .../org/apache/doris/clone/DynamicPartitionScheduler.java  | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java
 
b/fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java
index 9411009..49d65ed 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/clone/DynamicPartitionScheduler.java
@@ -145,9 +145,10 @@ public class DynamicPartitionScheduler extends 
MasterDaemon {
                 PartitionKey lowerBound = 
PartitionKey.createPartitionKey(Collections.singletonList(lowerValue), 
Collections.singletonList(partitionColumn));
                 PartitionKey upperBound = 
PartitionKey.createPartitionKey(Collections.singletonList(upperValue), 
Collections.singletonList(partitionColumn));
                 addPartitionKeyRange = Range.closedOpen(lowerBound, 
upperBound);
-            } catch (AnalysisException e) {
-                // keys.size is always equal to column.size, cannot reach this 
exception
-                LOG.warn("Keys size is not equal to column size. Error={}, db: 
{}, table: {}", e.getMessage(),
+            } catch (AnalysisException | IllegalArgumentException e) {
+                // AnalysisException: keys.size is always equal to 
column.size, cannot reach this exception
+                // IllegalArgumentException: lb is greater than ub
+                LOG.warn("Error in gen addPartitionKeyRange. Error={}, db: {}, 
table: {}", e.getMessage(),
                         db.getFullName(), olapTable.getName());
                 continue;
             }
@@ -220,9 +221,10 @@ public class DynamicPartitionScheduler extends 
MasterDaemon {
             PartitionKey lowerBound = 
PartitionKey.createPartitionKey(Collections.singletonList(lowerPartitionValue), 
Collections.singletonList(partitionColumn));
             PartitionKey upperBound = 
PartitionKey.createPartitionKey(Collections.singletonList(upperPartitionValue), 
Collections.singletonList(partitionColumn));
             reservePartitionKeyRange = Range.closedOpen(lowerBound, 
upperBound);
-        } catch (AnalysisException e) {
-            // keys.size is always equal to column.size, cannot reach this 
exception
-            LOG.warn("Keys size is not equal to column size. Error={}, db: {}, 
table: {}", e.getMessage(),
+        } catch (AnalysisException | IllegalArgumentException e) {
+            // AnalysisException: keys.size is always equal to column.size, 
cannot reach this exception
+            // IllegalArgumentException: lb is greater than ub
+            LOG.warn("Error in gen reservePartitionKeyRange. Error={}, db: {}, 
table: {}", e.getMessage(),
                     db.getFullName(), olapTable.getName());
             return dropPartitionClauses;
         }


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

Reply via email to