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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

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.

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.

Dominant language
Java
Stars
1.6k
Forks
847
Avg merge
2d 1h
Merged PRs (30d)
48

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from cloudfoundry/uaa

All issues in cloudfoundry/uaa

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.