Open stratoula opened 1 year ago
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)
Hi @stratoula,
Can you please check if there are less requests with https://github.com/elastic/kibana/pull/171638 ?
I think it's because of the logic in src/plugins/unified_histogram/public/chart/hooks/use_total_hits.ts
which I am changing in that PR but would like to verify.
If it works, I can create another PR for backporting.
Okay, created a smaller PR https://github.com/elastic/kibana/pull/172880 just for this issue.
@jughosta I totally missed the mention 🙈 I am reviewing the first PR now!
I can't reproduce the first 2 with this PR 🙌
An update here:
Apparently request count e2e tests for ES|QL were deleted at some point and we are not testing it right now. I tried to restore the tests but they are quite flaky https://github.com/elastic/kibana/pull/181184
The main problem is that now the text based editor also triggers esql
requests (for fields autocomplete) and this operation is unpredictable (sometimes several requests, sometimes none). I could not find a solution yet to isolate discover requests (chart + table) in e2e tests from the editor requests so it could be actually tested in a more controlled way.
Besides that, here are various types of fetches the Discover page makes:
The embeddable requests are particularly interesting because they are triggered by different app logic so there could be some concurrent triggers:
Once I even caught that for ES|QL query with stats, the embeddable made a separate request although we passed the prefetched data from Discover via table
prop to actually avoid extra requests:
Describe the feature: For some reason when we enabled EQSL in Discover the esql request is sent 4 times (instead of 2) when opening a saved search https://github.com/elastic/kibana/pull/146971#discussion_r1308475929
In all other cases it works as expected. I tried to understand what is going on but I can't, possibly because I am not very comfortable with the unified histogram case.
It will be cool to investigate and understand what is going on here.
Other cases with extra fetches are: