Transport options set on the client builder drop SafeResponseConsumer
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start by reading RestClientOptions.of(), Rest5ClientOptions.of(), and initialOptions() to trace how TransportOptions are converted; compare with the ElasticsearchClient.of(...) builder methods transportOptions(fn) and retryConfig(...). Check both the default and legacy transports against the expected safe consumer, then add or update tests showing that builder-configured options retain SafeResponseConsumer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Java API client version
main (f920563)
Java version
21
Elasticsearch Version
Any (client-side)
Problem description
RestClientOptions.of() and Rest5ClientOptions.of() convert other TransportOptions implementations starting from RequestOptions.DEFAULT, while initialOptions() starts from SafeResponseConsumer.DEFAULT_REQUEST_OPTIONS. Converted options therefore lose SafeResponseConsumer.
The ElasticsearchClient.of(...) builder methods transportOptions(fn) and retryConfig(...) produce DefaultTransportOptions, so a client configured like this runs without the safe consumer:
ElasticsearchClient client = ElasticsearchClient.of(b -> b
.host("http://localhost:9200")
.transportOptions(o -> o.addHeader("Foo", "bar"))
);
Rest5ClientOptions options = (Rest5ClientOptions) client._transportOptions();
// Expected: SafeResponseConsumer.DEFAULT_FACTORY
// Actual: HttpAsyncResponseConsumerFactory$BasicAsyncResponseConsumerFactory
System.out.println(options.restClientRequestOptions().getHttpAsyncResponseConsumerFactory());
The legacy transport (useLegacyTransport(true)) shows the same behavior with HeapBufferedResponseConsumerFactory. An Error thrown while consuming a response can then stop the I/O reactor, the failure that SafeResponseConsumer prevents (#1046).
- Lingua principale
- Java
- Stelle
- 525
- Fork
- 299
- Merge medio
- 13h 9m
- PR unite (30g)
- 5
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 elastic/elasticsearch-java
-
`rebuild()` of bulk operations (`IndexOperation`, `CreateOperation`, `UpdateOperation`) drops most fieldsForse già presa @l-trotta l’ha presa 5 giorni fa. ApertaArea: Generator Category: Bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
elastic/elasticsearch-java#1353 · 1 commento · 1 assegnatario ·
-
Delete By Query deserialization will not account for search failuresForse già presa @l-trotta l’ha presa 18 giorni fa. Aperta
elastic/elasticsearch-java#1349 · 1 commento · 1 assegnatario ·
-
Nested index settings that do not end up deserialized in otherSettings leads to requiring properties on parent JSON nodesForse già presa @l-trotta l’ha presa 18 giorni fa. ApertaArea: Specification Category: Bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
elastic/elasticsearch-java#1347 · 1 commento · 1 assegnatario ·
-
RestClientTransport sends bulk bodies as one HTTP chunk / TLS record / syscall per NDJSON buffer, burning ~45x the reactor CPU of the HLRCForse di nuovo libera @l-trotta l’ha presa 34 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
elastic/elasticsearch-java#1339 · 7 commenti · 1 assegnatario ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
elastic/elasticsearch-java#1212 · 8 commenti ·
Tutte le issue di elastic/elasticsearch-java
Issue simili
-
better night vision compatAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuicksilverMC/Argentum#31 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
navikt/mock-oauth2-server#1129 ·
I maintainer di solito rispondono entro 1 giorno
-
bug main ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
openhab/openhab-webui#4600 ·
I maintainer di solito rispondono entro 4 giorni
-
26.4 area: tags enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
`DeepSeekChatModel` streaming returns no content when chunks have no `id`Forse già presa @lejuho l’ha presa oggi. Apertastatus: waiting-for-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
spring-projects/spring-ai#7214 ·
I maintainer di solito rispondono entro 2 giorni