You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- batch concurrent search is labeled as deprecated in current code base Label is removed here
Once the settings is turned on. Any searches through High level data plugin search API, will issue _msearch requests to OpenSearch. A _msearch can execute multiple search requests together, instead of one-by-one through multiple _searchAPI call. Especially used for dashboards use case, where it renders multiple visualization, with multiple search requests are issued at same time.
* This function introduces a slight delay in the request process to allow multiple requests to queue
* up (e.g. when a dashboard is loading).
*/
exportasyncfunctionfetchSoon(
2. Why batch concurrent search doesn't work with multiple data source feature?
MD feature enables OSD user to search against any other OpenSearch clusters. MD identifier is passed along with search request, so the server side can decide which data source client to use, to query data.
One _msearch request can only be sent from One client: Batch concurrent search queues up search requests, and issue one _msearch, from one client. But when MD feature is enabled, these search requests may contain info from many data sources. So they can't be queued up. (E.g. created a dashboard, that has visualization-1 (from data source 1), visualization-2 (from data source 2), etc.
3. Solution
To fully support batch concurrent search with MD, it requires a refactor of everywhere consuming msearch in OSD, a refactor of the queueing mechanism. Additional mechanism to store and pass multiple data sources identifiers. Given the effort, I propose the following.
Phase 1: Disable batch concurrent search from Advanced OSD setting, when MD is enabled
Phase 2: Depending on community feedback, then decide the priority of this integration.
Notes:
Code changes to support msearch with MD needs to be made from here at least. Pass in data source client as opensearchClient, based on the if the request body/param has dataSourceId. To get data source client, we use the standard api context.data_source.opensearch.getClient(<dataSourceId>)
zhongnansu
changed the title
[MD] _msearch not likely to work with multiple data source
[MD] batch concurrent search is not likely to work with multiple data source
Oct 3, 2022
zhongnansu
changed the title
[MD] batch concurrent search is not likely to work with multiple data source
[MD] Onboard batch concurrent search with multiple data source
Nov 9, 2022
1. Background:
-Label is removed herebatch concurrent search
is labeled as deprecated in current code base_msearch
requests to OpenSearch. A_msearch
can execute multiple search requests together, instead of one-by-one through multiple_search
API call. Especially used for dashboards use case, where it renders multiple visualization, with multiple search requests are issued at same time.The individual requests are queueing up here.
OpenSearch-Dashboards/src/plugins/data/common/search/search_source/legacy/fetch_soon.ts
Lines 37 to 41 in d53fbf8
2. Why batch concurrent search doesn't work with multiple data source feature?
_msearch
request can only be sent from One client: Batch concurrent search queues up search requests, and issue one_msearch
, from oneclient
. But when MD feature is enabled, these search requests may contain info from many data sources. So they can't be queued up.(E.g. created a dashboard, that has visualization-1 (from data source 1), visualization-2 (from data source 2), etc
.3. Solution
To fully support batch concurrent search with MD, it requires a refactor of everywhere consuming
msearch
in OSD, a refactor of the queueing mechanism. Additional mechanism to store and pass multiple data sources identifiers. Given the effort, I propose the following.Notes:
Code changes to support msearch with MD needs to be made from here at least. Pass in data source client as
opensearchClient
, based on the if the request body/param has dataSourceId. To get data source client, we use the standard apicontext.data_source.opensearch.getClient(<dataSourceId>)
OpenSearch-Dashboards/src/plugins/data/server/search/routes/msearch.ts
Line 74 in a528965
The text was updated successfully, but these errors were encountered: