-
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
[Cases] Performance and RBAC improvements #101465
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
fda09f4
to
44bfa52
Compare
Don't see any changes related to Core, but the approach LGTM. |
Thank you @mshustov! This PR was based on another PR (the RBAC PR) that touched some of your files. The PR got merged and I switched the base to master and your team left as a reviewer. Sorry for the trouble. |
@elasticmachine merge upstream |
676403c
to
b06d2b6
Compare
b06d2b6
to
075364c
Compare
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.
Looking good, just two more places I think we need the 10k
perPage
:
https://github.com/elastic/kibana/blob/master/x-pack/plugins/cases/server/services/cases/index.ts#L402
}); | ||
|
||
// Ensuring we don't too many concurrent get running. | ||
const comments = await pMap(ids, getCommentsMapper, { |
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.
nit: This isn't a change you made but if I understand the previous code correctly comments
will be an array of saved object find responses (essentially an array of arrays [[1,2,3],[4,5,6]]
). If we flattened it I wonder if it would make the deleteCommentsMapper
a little easier to understand 🤷♂️ . That way we could avoid the pMap
inside of the mapper.
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.
That's smart! As we gonna use search_after
to iterate over all objects I will leave it for another PR and create a ticket to track it.
@@ -77,6 +77,7 @@ export const find = async ( | |||
|
|||
ensureSavedObjectsAreAuthorized([...cases.casesMap.values()]); | |||
|
|||
// casesStatuses are bounded by us. No need to limit concurrent calls. |
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.
👍
💚 Build SucceededMetrics [docs]Public APIs missing comments
Page load bundle
History
To update your PR or re-run it, just comment with: cc @cnasikas |
Summary
Resolves: #100804
For maintainers