-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
elasticsearch hung up / closing connection during collapse search query with size parameter #104647
Comments
Pinging @elastic/es-search (Team:Search) |
Reproduces for me:
|
I have a yaml test that replicates what @DaveCTurner does for his replication. I have verified it fails all the way back in 8.9. In 8.8, I get a different failure other than the chunked xcontent failure. I am guessing we are running into the same bad xcontent objects but chunked serialization is just failing at a different part.
|
OK, I have verified this bug seems to be because @sh3bang does your request fail when you provide a
|
@jimczi @javanna ^ what do y'all think? Should we default to the field name when This bug seems like its been around for a LONG time, but now its worse due to new ways of serializing xcontent. |
That's a relief, I was worried we'd messed something up recently.
I'm not sure it's meaningfully worse with the chunked encoding tbh, you never got a useful response to this request. |
@benwtrent nope, it doesn't fail! Nice workaround - thanks. ;) |
@DaveCTurner you are correct, it isn't worse in any meaningful way other than the error_trace log doesn't indicate why the xcontent serialization failed :(. I had to go back before chunking to see what part of the xcontent serialization broke.
🎉 🎉 🎉 There is some funkiness around duplicate name values (e.g. providing the same name for two inner_hits or both defaulting to |
@jimczi @javanna the fact that we allow duplicate I vote we require |
+1, that would be inlined with the behaviour of the nested query
That shouldn't be the case. See #37645 where the intent is to throw when there's a name clash. Did you find an example where the logic is flawned? |
See: elasticsearch/server/src/main/java/org/elasticsearch/action/search/ExpandSearchPhase.java Line 88 in 73a6840
We call
With no checks. That PR only messes with nested things, nothing about |
I think either:
Those were the two options back when this was fixed for nested. |
ok bummer, although I think the duplicate name is another issue. Requiring name or default name to collapse field doesn't prevent the possible duplication. |
`name` is de facto required for `collapse.inner_hits`. It always has been, but we have never validated up front. Instead we accidentally try to serialize `null`, which leads to exciting and confusing errors. closes: #104647
Elasticsearch Version
8.12.0
Installed Plugins
No response
Java Version
bundled
OS Version
Linux behemoth 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Problem Description
Hello,
if i do a collapse query with inner_hits size limit elastic suddenly close the connection without answer!
Steps to Reproduce
POST http://elastic:9200/products/_search
Logs (if relevant)
The text was updated successfully, but these errors were encountered: