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

Open
#3,094 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
844
Avg merge
2d 5h
Merged PRs (30d)
27

Description

https://github.com/cloudfoundry/uaa/blob/ceff2bb5ff14396bbb925b7073c22412641dbfaf/server/src/main/java/org/cloudfoundry/identity/uaa/scim/endpoints/ScimGroupEndpoints.java#L152

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.