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
Profiler for scroll request throws Exception (The collector can only be set once) #27376
Comments
Thanks for reporting @dantalian-pv. This is indeed producing an error. Is there a particular issue why you're profiling a scroll search? I think that profiling the search makes sense (query and aggregations), but subsequent scroll searches don't make a lot of sense. Shorter reproduction:
|
On the Java Client there is no possibility to enable/disable a profiler for scroll, so, I assume, If the profiler is enabled for the qery, then profiler is enabled for this scroll (Java Client level, I think). |
I see, I think profiling should then just be ignored for search scroll invocations. |
I started to look into this, and while it's technically possible for the search to be profiled but not the subsequent scrolls... the code is kinda messy. The place where we profile doesn't have access to clearing out the search context, so it needs several messy conditionals to disable profiling on the subsequent scrolls. I think we should just throw an exception if @martijnvg @jpountz thoughts? |
Since this doesn't work today anyway, I'm +1 to disallow profiling scroll requests for now and documenting it. We can always revisit later if we want to. |
Pinging @elastic/es-search-aggs |
Pinging @elastic/es-search (Team:Search) |
Elasticsearch version (
bin/elasticsearch --version
):Plugins installed: [
<search-guard-client-version>5.6.4-23</search-guard-client-version>
]JVM version (
java -version
):openjdk version "1.8.0_151"
OS version (
uname -a
if on a Unix-like system):Linux 4.4.92-31-default #1 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
When I am trying to use scroll for any search query with enabled profile, scroll request throws the next exception:
Steps to reproduce:
Any index with 2 shard and 2 replicas and >50 documents with any content.
The text was updated successfully, but these errors were encountered: