Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Scalability: Improve scaling of users and organisations #4156

Merged
merged 14 commits into from
Mar 17, 2020

Conversation

richard-cox
Copy link
Contributor

@richard-cox richard-cox commented Mar 10, 2020

Scaling Related Fixes

  • Fix double fetching of missing user relations for getUser (speeds up all pages that require a specific user's roles)
    • getUser would first attempt to fetch all users via getUsers
    • getUsers could take a long time due to missing relations (users with more than 50 per role)
    • getUser wouldn't wait for this to finish and then try and make an individual request to fetch user
    • this user would then also be validated and missing relations fetched
  • Remove org-space-route relation from orgs and org api requests (speeds up cf orgs list, org pages and all below)
  • Ensure we don't fetch entity counts unless we need to

General Fixes

- getUser would first attempt to fetch all users via getUsers
- getUsers could take a long time due to missing relations (users with more than 50 per role)
- getUser wouldn't wait for this to finish and then try and make an individual request to fetch user
- this user would then also be validated and missing relations fetched
@richard-cox richard-cox added in progress community Community Raised Issue labels Mar 10, 2020
@richard-cox richard-cox self-assigned this Mar 10, 2020
- Remove org-space-route relation from orgs and org api requests
- Ensure we don't fetch entity counts unless we need to
- sometimes errorResponse can be null (for instance timeout)
- Delete SI success handler was incorrectly clearing pagination instead of just removing entity from pagination
- Delete of entity was fine, however it was not removed from list
- With bug entity was still not visible in list afterwards only due to nulls filtered out in list
@richard-cox richard-cox changed the title Scaling Related & Delete Org Fixes Scaling Related & Minor Fixes Mar 11, 2020
@richard-cox richard-cox added the conflicts Merge conflicts on PR label Mar 13, 2020
@richard-cox richard-cox added the needs attention This PR needs attention label Mar 13, 2020
@richard-cox richard-cox removed conflicts Merge conflicts on PR needs attention This PR needs attention labels Mar 13, 2020
Copy link
Contributor

@nwmac nwmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nwmac nwmac merged commit 861b9d6 into master Mar 17, 2020
@nwmac nwmac deleted the scale-related-fixes branch March 17, 2020 10:53
@richard-cox richard-cox added this to the 3.1.0 milestone Apr 14, 2020
@richard-cox richard-cox changed the title Scaling Related & Minor Fixes Scalability: Improve scaling of users and organisations Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community Raised Issue ready for review
Projects
None yet
2 participants