Backend returns exception for search in home page


When running in cloud environment the control center (Home page) gets an exception from backend for pagination (search metadata api).

Our best guess is that the issue seems to be from the way UI uses the metadata api.

Backend expects a cursor OR an offset as part of the metadata api request to retrieve search response. However UI seems to be sending `cursorRequested: true` and an offset.

However we have also seen logs that doesn't have both but still return an exception. Based on talking to we will ignore the cursor if offset is present in the search request.


Release Notes

Fixes an issue with Metadata search result pagination


Andreas Neumann
April 4, 2019, 7:24 PM
Ajai Narayanan
April 4, 2019, 1:07 AM

It should be fine as we will still be using the offset to move forward. Since we get total results we should be able to move forward with offsets.

Andreas Neumann
April 4, 2019, 12:50 AM

There are tow kinds of issues:


1.  a request that has an offset and requests a cursor, which elastic rejects:

2. a request that has a cursor that has timed out, and requests a cursor. Because the cursor is timed out, the backend performs a new search with the offset of the cursor, and requests a new cursor. Thus causing the same error as case 1. 

The fix would be to ignore the request for cursor any time that an offset is given. This means a cursor will not be returned despite the &requestCursor=true, and the frontend needs to be able to handle that: It should not assume that there are no more results, but simply request the next page without a cursor. 

Your pinned fields
Click on the next to a field label to start pinning.


Andreas Neumann


Ajai Narayanan