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

mhubail pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit ceb62bead43c6c9879c1a99ed44374da4348fcc4
Author: Murtadha Hubail <[email protected]>
AuthorDate: Sat Apr 12 21:14:33 2025 +0300

    [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
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19643
    Reviewed-by: Ali Alsuliman <[email protected]>
    Tested-by: Jenkins <[email protected]>
    Integration-Tests: Jenkins <[email protected]>
---
 .../apache/asterix/column/operation/lsm/flush/FlushColumnMetadata.java | 2 +-
 .../src/main/java/org/apache/hyracks/util/ExponentialRetryPolicy.java  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

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 9c58247ca0..f987abe527 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 @@ public class FlushColumnMetadata extends 
AbstractColumnMetadata {
                 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 72a3bb07e8..8967e3e28c 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 @@ public class ExponentialRetryPolicy implements IRetryPolicy {
 
     @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) {

Reply via email to