[CI] NettyClientTest.testServerDisconnection may fail with DisconnectException
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 86/100
Direzione di ricerca
Inizia da NettyClientTest.testServerDisconnection, vicino all’asserzione che fallisce alla riga 165. Leggi come il test attende che la mappa delle connessioni diventi vuota dopo il fallimento della richiesta, quindi aggiungi un’attesa dopo nettyServer.close() e prima della richiesta successiva, mantenendo l’attesa di pulizia esistente. Esegui ripetutamente il test mirato; dovrebbe verificare in modo coerente ConnectException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I searched in the issues and found nothing similar.
Fluss version
1.0.0 (latest release)
Please describe the bug 🐞
NettyClientTest.testServerDisconnection can still fail intermittently in CI after #4344.
The test expects a ConnectException when sending a request after shutting down the Netty server, but occasionally receives a DisconnectException instead:
NettyClientTest.testServerDisconnection:165
Expecting actual throwable to be an instance of:
java.net.ConnectException
but was:
org.apache.fluss.exception.DisconnectException:
Cannot send request to server localhost:40463
(id: cs-1, rack: null) because it is disconnected.
https://github.com/apache/fluss/actions/runs/39053988878/job/117458107688?pr=4545
After nettyServer.close(), the client detects the disconnection and asynchronously removes the old ServerConnection from its connection map.
However, the test immediately sends another request without waiting for the old connection to be removed.
If the request arrives after the connection has entered the DISCONNECTED state but before it is removed from the map, NettyClient.getOrCreateConnection() may return the disconnected connection.
In this case, ServerConnection.doSend() fails the request with a DisconnectException rather than attempting a new connection that would fail with a ConnectException.
This makes the exception assertion sensitive to the timing of asynchronous connection cleanup.
The previous fix in #4344 added a retry to wait for the connection map to become empty, but that retry happens after the failed request and therefore does not prevent this race.
Solution
Wait for the old connection to be removed after shutting down the server and before sending the next request.
Keep the existing retry after the failed request to ensure that the newly created, failed connection is also cleaned up before restarting the server.
This preserves the existing ConnectException assertion and requires no changes to production code.
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- Java
- Stelle
- 2.2k
- Fork
- 656
- Merge medio
- 2g 16h
- PR unite (30g)
- 103
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 apache/fluss
-
[lake/iceberg] Reserved write-mode properties can be set and reset through their `iceberg.` keyForse già presa @aphenix-r7 l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/fluss#4658 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[common] Decimal#hashCode is inconsistent with Decimal#equalsForse già presa @firasbouzazi l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/fluss#4538 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[security] PlainSaslServerProvider conflicts with Hadoop SASL provider causing authentication failureForse già presa @xinzhang-hello l’ha presa 21 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[server] KV snapshot scheduling stops permanently after a transient snapshot-init failureForse già presa @zhang-arvin l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
apache/fluss#4489 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[docs] Document advertised-resource and ACL principal ignore-case optionsForse già presa @EchoLee5 l’ha presa 34 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/fluss
Issue simili
-
status: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
spring-projects/spring-ai#7206 ·
I maintainer di solito rispondono entro 2 giorni
-
area/cli
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
quarkusio/quarkus#57623 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jhipster/prettier-java#1113 ·
I maintainer di solito rispondono entro 2 giorni
-
bug follow-up lane:backlog
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Sanne/incus-spawn#1576 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Pasting code into a comment adds imports for the pasted codeForse già presa @ravnskjaer l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
eclipse-jdt/eclipse.jdt.ui#3275 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno