You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix performance issues with many offline sessions - #15463
Thanks for the PR. I have been thinking about this a bit and here are my thoughts:
Should we be worried about reintroducing IN-clause which was removed in last performance optimization attempt? If the userSessionsIds set used in IN-cause gets too big, performance will be probably bad. However, I think we should be OK because userSessionIds size should be reasonable. There are these use-cases:
load user session by user (not limited by first,max parameters as it is called with first=0, max=null, but limited by number of user session which user can has. Not sure if this can be a high number in real scenarios. Maybe yes, if someone creates many offline user sessions for a user by i.e password grant type)
load user sessions by client (this can be a high number but it is called only from services and endpoint is limiting max result size -- 100 by default)
load user sessions by interval - IN clause not used and method is called only from pre-loading
Thank you for the reply. These are exactly the arguments why I am in favour of introducing the IN clauses for the cases when the session is known in advance while keeping the interval for preloading, and this PR should reflect it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area/storageStorage layer — JPA entities, database schemas, Liquibase migrations, cachingkind/bugCategorizes a PR related to a bug
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #13340
Pipeline run: https://master-jenkins.redhat.com/job/universal-test-pipeline-server/2385/