graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Async Search API Endpoint Always Runs Synchronously

Open alex-konn opened this issue 6 years ago • 1 comments

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)

  1. Execute a search from the browser
  2. Check the called URLs with debug tools
  3. /views/search/{id}/execute always contains the full result set, no matter how long the search took and /views/search/status/{jobId} is never called.

alex-konn avatar Oct 14 '19 14:10 alex-konn

Any recent updates on this?

samupr avatar Apr 29 '21 07:04 samupr

Fixed in #18308.

dennisoelkers avatar Dec 03 '24 13:12 dennisoelkers