From bfb19ea9b3d0dc4d4431091e03bb23c4bb4ebe85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E9=98=BF=E9=B2=B2?= Date: Mon, 21 Feb 2022 15:41:34 +0800 Subject: [PATCH] [#5] fail fast when iceberg ranger error occurs --- .../iceberg/catalog/AbstractMetastoreTableOperations.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/AbstractMetastoreTableOperations.java b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/AbstractMetastoreTableOperations.java index 0751124ea5505..bca5f3ccc87dd 100644 --- a/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/AbstractMetastoreTableOperations.java +++ b/plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/AbstractMetastoreTableOperations.java @@ -292,6 +292,8 @@ protected void refreshFromMetadataLocation(String newLocation) Tasks.foreach(newLocation) .retry(20) .exponentialBackoff(100, 5000, 600000, 4.0) + .throwFailureWhenFinished() + .shouldRetryTest(e -> e.getCause() == null || !e.getCause().toString().contains("Permission denied")) .run(metadataLocation -> newMetadata.set( TableMetadataParser.read(this, io().newInputFile(metadataLocation))));