opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.68k stars 881 forks source link

[BUG]Datasource picker in discover sending multiple redundant requests #6810

Open abbyhu2000 opened 5 months ago

abbyhu2000 commented 5 months ago

Describe the bug Each time when we change the data source from the data source picker in the discover, it is sending multiple requests and some of them are repetitive.

To Reproduce

https://github.com/opensearch-project/OpenSearch-Dashboards/assets/43937633/9f29d121-2aa9-4162-bdf2-ca8949e9fc7a

Dashboards Version 2.11

AMoo-Miki commented 4 months ago

There are 2 problems here that might be related:

  1. There are probably too many calls being made when a change occurs to this selector: IndexPatternSelect is defined in src/plugins/data/public/ui/index_pattern_select.
  2. One of the calls is more than likely related to the previously selected value which results in re-triggering any errors that were previously triggered.