Transport options set on the client builder drop SafeResponseConsumer
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 54/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Java
- Star
- 525
- Fork
- 299
- Merge trung bình
- 13 giờ 9 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của elastic/elasticsearch-java
-
`rebuild()` of bulk operations (`IndexOperation`, `CreateOperation`, `UpdateOperation`) drops most fieldsCó thể đã có người làm @l-trotta đã nhận 8 ngày trước. Đang mởArea: Generator Category: Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 50/100
elastic/elasticsearch-java#1353 · 1 bình luận · 1 người được giao ·
-
Delete By Query deserialization will not account for search failuresCó thể đã có người làm @l-trotta đã nhận 21 ngày trước. Đang mở
elastic/elasticsearch-java#1349 · 1 bình luận · 1 người được giao ·
-
Nested index settings that do not end up deserialized in otherSettings leads to requiring properties on parent JSON nodesCó thể đã có người làm @l-trotta đã nhận 21 ngày trước. Đang mởArea: Specification Category: Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
elastic/elasticsearch-java#1347 · 1 bình luận · 1 người được giao ·
-
RestClientTransport sends bulk bodies as one HTTP chunk / TLS record / syscall per NDJSON buffer, burning ~45x the reactor CPU of the HLRCCó thể làm lại được @l-trotta đã nhận 37 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
elastic/elasticsearch-java#1339 · 7 bình luận · 1 người được giao ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
elastic/elasticsearch-java#1212 · 8 bình luận ·
Tất cả issue của elastic/elasticsearch-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
checkstyle/checkstyle#22153 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation Needs Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
frankframework/frankframework#11908 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ome/ome-codecs#48 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
tonihele/OpenKeeper#672 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-ee4j/angus-mail#224 ·