Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisearch ignores memory circuit breaker errors #2923

Open
mvdz opened this issue Sep 22, 2023 · 0 comments
Open

Multisearch ignores memory circuit breaker errors #2923

mvdz opened this issue Sep 22, 2023 · 0 comments

Comments

@mvdz
Copy link

mvdz commented Sep 22, 2023

Demonstrated by this code which temporarily sets the cluster limit to 1 byte in order to force the error:

import com.sksamuel.elastic4s.ElasticDsl._
import com.sksamuel.elastic4s.http.JavaClient
import com.sksamuel.elastic4s.{ElasticClient, ElasticProperties}

val client = ElasticClient(JavaClient(ElasticProperties("http://localhost:9200")))
println(client.execute(clusterTransientSettings(Map("indices.breaker.total.limit" -> "1b"))).await)
val request = multi(search("_all"))
val response = client.execute(request).await
println(response)
println(client.execute(clusterTransientSettings(Map("indices.breaker.total.limit" -> null))).await)
client.close()

Actual result: RequestSuccess response with an empty list of items:

RequestSuccess(
  429,
  Some({"error":{"root_cause":[{"type":"circuit_breaking_exception","reason":"[parent] Data too large, data for [<http_request>] would be [220036656/209.8mb], which is larger than the limit of [1/1b], real usage: [220036616/209.8mb], new bytes reserved: [40/40b], usages [model_inference=0/0b, eql_sequence=0/0b, fielddata=0/0b, request=0/0b, inflight_requests=40/40b]","bytes_wanted":220036656,"bytes_limit":1,"durability":"TRANSIENT"}],"type":"circuit_breaking_exception","reason":"[parent] Data too large, data for [<http_request>] would be [220036656/209.8mb], which is larger than the limit of [1/1b], real usage: [220036616/209.8mb], new bytes reserved: [40/40b], usages [model_inference=0/0b, eql_sequence=0/0b, fielddata=0/0b, request=0/0b, inflight_requests=40/40b]","bytes_wanted":220036656,"bytes_limit":1,"durability":"TRANSIENT"},"status":429}),
  Map(X-elastic-product -> Elasticsearch, content-type -> application/json, content-length -> 849),
  MultiSearchResponse(List())
)

Expected result is a: RequestFailure(429,...

Tested with the latest releases: elastic4s 8.9.2 and Elasticsearch 8.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant