-
Notifications
You must be signed in to change notification settings - Fork 235
feat(aggregation-count): count docs COMPASS-5756 #3011
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
Conversation
…aggregation-count
…aggregation-count
…aggregation-count
case WorkspaceActionTypes.WorkspaceChanged: | ||
return INITIAL_STATE; |
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.
As we are not cleaning up inflight counts when workspace type is changed (both for count and for results), you can run into a pretty nasty race condition where slower, older pipeline results and counts replace content of the newer one. Here's how it looks in UI:
We should definitely fix that both for counts and for results
…aggregation-count
if (view === 'builder') { | ||
dispatch(cancelAggregation()); | ||
dispatch(cancelCount()); | ||
} |
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're definitely getting there. I think you would also want to do this when Run button is pressed if there is an in-flight request running, otherwise I can overload server pretty easily (but more importantly if I'm running a long query and maybe change collation or maxtimems there is a chance of running into race condition issue):
…s/compass into COMPASS-5756-aggregation-count
Co-authored-by: Sergey Petushkov <petushkov.sergey@gmail.com>
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.
I think you can improve the aggregation state slice a bit by not deriving state in the action and doing it in a reducer instead. Otherwise looks good
feat(aggregation-count): count docs COMPASS-5756
count aggregation documents
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes