graylog2-server
graylog2-server copied to clipboard
Async Search API Endpoint Always Runs Synchronously
Expected Behavior
The API resource /views/search/{id}/execute should trigger an asynchronous search. The result would then be retrieved from /views/search/status/{jobId}.
Current Behavior
/views/search/{id}/execute always blocks and answers with the complete result.
Possible Solution
Fix implementation of org.graylog.plugins.views.search.engine.QueryEngine::execute. The method explicitly blocks: https://github.com/Graylog2/graylog2-server/blob/b75eee34c4283604102989eb0ccfc65495f5255e/graylog2-server/src/main/java/org/graylog/plugins/views/search/engine/QueryEngine.java#L129
Steps to Reproduce (for bugs)
- Execute a search from the browser
- Check the called URLs with debug tools
-
/views/search/{id}/executealways contains the full result set, no matter how long the search took and/views/search/status/{jobId}is never called.
Any recent updates on this?
Fixed in #18308.