cloudfoundry / cloudfoundry/uaa
listGroups fetching all the rows from DB although the methods is taking count as parameter which can be used in the query as well
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 844
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 27
Description
The expression mentioned above is fetching all the rows from DB for a zone id. As the method also accepts count parameter, can't we utilize this in the query to limit the result set instead of iterating and collecting the required rows below in filterForCurrentUser method.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in server/src/main/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimGroupEndpoints.java around line 152, then follow filterForCurrentUser and the query it uses. Check how the count parameter is passed through and determine whether the database result set can be bounded without changing filtering behavior. Done means the query limits results appropriately while preserving the endpoint's current response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, database, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100