-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Search Sessions] batch trackId calls #90956
Conversation
const idMappings = Object.values(idMapping).map((value: any) => value.id); | ||
expect(idMappings).to.contain(id1); | ||
expect(idMappings).to.contain(id2); | ||
await retry.waitForWithTimeout('searches persisted into session', 5000, async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We anyway had a subtle race condition here before this pr, because we never awaited trackId
inside session service. No time to track increase because of batching, so this test was failing more ofter
Pinging @elastic/kibana-app-services (Team:AppServices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working fine.
I wonder if we should increase the debounce interval a little. Even on my local machine, a dashboard search session is still updated in a total of 3-4 calls to ES (which is still a huge improvement from 2-3 calls per search!)
x-pack/plugins/data_enhanced/server/search/session/session_service.ts
Outdated
Show resolved
Hide resolved
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Summary
Not sure if we need this, want to check if it helps with this noise
Opening
[Logs] Web Traffic
dashboard audit logs locallyBefore
updating search-session
~16-20 times in totalAfter
updating search-session
~3 times in totalAfter the change
Checklist
Delete any items that are not applicable to this PR.
For maintainers