aws / aws/aws-sdk-java-v2

Add an option to disable retries on UnknownHostException

Aperta
#4,739 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug p2
Lingua principale
Java
Stelle
2.6k
Fork
1k
Merge medio
2g 9h
PR unite (30g)
51

Descrizione

### Describe the bug

See #4738

The S3A connector doesn't want to retry on unknown host exception on the following basis: the host is unknown. While from the AWS perspective this may seem a transient problem, it's generally isn't.
* third-party stores with custom endpoints usually hit this when the endpoint what is URL is misconfigured. This is the configuration problem which will not be recovered from.
* region-based derivation of endpoints is brittle to the region being misconfigured. Again, retries achieve nothing here.
* Attempting to use an s3express bucket with a region which doesn't support it will trigger retries of the crate session API. And this will not resolved until AWS rolls out of that storage class that region.

### Expected Behavior

attempts to connect to an endpoint which trigger UnknownHostException to fail fast and let our application logic decide what to do (for us: fail)

### Current Behavior

* Api Call attempt is retried
* If too many retries are attempted for the api call timeout: failure with loss of inner cause
* S3AFS currently treats ApiCallTimeoutException as recoverable; we may need to revisit this.

### Reproduction Steps

See [HADOOP-19000](https://issues.apache.org/jira/browse/HADOOP-19000) for this surfacing connecting to S3Express buckets.

### Possible Solution

client builder to allow us to disable treating unknownHostException as something SDK should retry on.

### Additional Information/Context

_No response_

### AWS Java SDK version used

2.21.33

### JDK version used

openjdk version "1.8.0_362" OpenJDK Runtime Environment (Zulu 8.68.0.21-CA-macos-aarch64) (build 1.8.0_362-b09) OpenJDK 64-Bit Server VM (Zulu 8.68.0.21-CA-macos-aarch64) (build 25.362-b09, mixed mode

### Operating System and version

macos 13.4.1

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Parti dal client builder e segui il modo in cui i tentativi di chiamata API classificano UnknownHostException per i retry. Verifica l’interazione con ApiCallTimeoutException. Il lavoro è completato quando i chiamanti possono configurare la gestione di UnknownHostException in modo che i fallimenti dell’endpoint falliscano immediatamente senza retry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, java
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.