>From Murtadha Hubail <[email protected]>:

Murtadha Hubail has uploaded this change for review. ( 
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19643 )


Change subject: [NO ISSUE][RT] Do not retry IllegalArgumentException on 
ExponentialRetryPolicy
......................................................................

[NO ISSUE][RT] Do not retry IllegalArgumentException on ExponentialRetryPolicy

- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- When the failure is caused by IllegalArgumentException, do not
  attempt to retry on ExponentialRetryPolicy since the operation
  will just fail again with the same exception.

Ext-ref: MB-66258
Change-Id: I0d5bb61eff7d85cc924b05b56ca9bc51d469edf2
---
M 
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java
M 
hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java
2 files changed, 24 insertions(+), 1 deletion(-)



  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/43/19643/1

diff --git 
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java
 
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java
index 9c58247..f987abe 100644
--- 
a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java
+++ 
b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java
@@ -563,7 +563,7 @@
                 addColumn(columnIndex, writer);
                 return new PrimitiveSchemaNode(columnIndex, normalizedTypeTag, 
primaryKey);
             default:
-                throw new IllegalStateException("Unsupported type " + 
childTypeTag);
+                throw new IllegalArgumentException("Unsupported type " + 
childTypeTag);

         }
     }
diff --git 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java
 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java
index 72a3bb0..8967e3e 100644
--- 
a/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java
+++ 
b/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java
@@ -85,6 +85,9 @@

     @Override
     public boolean retry(Throwable failure) throws InterruptedException {
+        if (failure instanceof IllegalArgumentException) {
+            return false;
+        }
         if (attempt < maxRetries) {
             long sleepTime = ThreadLocalRandom.current().nextLong(1 + delay);
             if (printDebugLines) {

--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19643
To unsubscribe, or for help writing mail filters, visit 
https://asterix-gerrit.ics.uci.edu/settings

Gerrit-Project: asterixdb
Gerrit-Branch: ionic
Gerrit-Change-Id: I0d5bb61eff7d85cc924b05b56ca9bc51d469edf2
Gerrit-Change-Number: 19643
Gerrit-PatchSet: 1
Gerrit-Owner: Murtadha Hubail <[email protected]>
Gerrit-MessageType: newchange

Reply via email to