DefaultAsyncClient never completes the returned future when Client throws Error
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Inizia con DefaultAsyncClient e l’AsyncFeignTest esistente; l’issue descrive la chiamata sincrona del client, il future restituito separatamente e i casi di regressione sia per l’adattatore sia per il percorso pubblico AsyncFeign. Esegui i test riportati con il profilo di sviluppo Maven e conferma che un AssertionError fa sì che il future restituito termini eccezionalmente con l’errore originale, mentre i controlli esistenti per eccezioni e successo continuano a passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
DefaultAsyncClient can leave its returned CompletableFuture pending forever when the synchronous client throws an Error.
The adapter submits a task to an ExecutorService, then completes a separate future inside catch (Exception). An AssertionError bypasses that catch. The executor captures it in its own FutureTask, while the future returned to the caller is never completed. This also hangs a call made through AsyncFeign.
A bounded reproduction on current master e32547ac3afd7386f8427efaaddb97df384596df uses a normal single-thread executor and a client lambda that throws one pre-created AssertionError:
Client client = (request, options) -> { throw failure; };
CompletableFuture<Response> response = new DefaultAsyncClient<Void>(client, executor)
.execute(request, new Request.Options(), Optional.empty());
response.get(1, TimeUnit.SECONDS);
Expected: an ExecutionException whose cause is the original error, consistent with the AsyncClient completion contract. Actual: TimeoutException.
I added direct-adapter and public AsyncFeign cases to the existing AsyncFeignTest, with IOException, runtime-exception and successful-response controls. The actual run reports 59 tests, 2 failures, 0 errors/skips; both failures are the expected timeout. Each executor is shut down in finally; the cases use no network request or real VM exhaustion.
Verification used the unmodified Maven build with the dev profile, JDK 8 for main sources and JDK 25 for tests. The change can be limited to completing the returned future exceptionally for any throwable from the synchronous client; executor rejection and other async adapters are outside this report. I will send that small fix with these regressions and a changelog entry.
- Lingua principale
- Java
- Stelle
- 9.8k
- Fork
- 2k
- Merge medio
- 1h 15m
- PR unite (30g)
- 39
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenFeign/feign
-
Response.charset ignores charset after another Content-Type parameterForse già presa @hutiefang76 l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
UriUtils ignores allowReservedCharacters=false when the input has no percent tripletForse già presa @hutiefang76 l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Java11 Http2Client loses response header value order and duplicate occurrencesForse già presa @hutiefang76 l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Java11 Http2Client rejects documented zero connect and read timeoutsForse già presa @hutiefang76 l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Query values are split at literal commas or lost when arrays are usedForse già presa @hutiefang76 l’ha presa 15 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenFeign/feign
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
liberation-data/drivine4j#547 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itForse già presa @AkashB23 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
spring-cloud/spring-cloud-stream#3321 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Forse già presa @fishdry1000 l’ha presa 4 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
ai-driven-fuzzing bug claude Minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linagora/twake-calendar-side-service#1333 ·
I maintainer di solito rispondono entro 1 giorno