This issue has been created
There are 4 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-8d009a38-6c9c-485e-b886-264593d1b8d8 XWIKI-23050 In Progress

The group members cache can quickly end up being filled with users as key

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-1c376040-2190-45d5-8b3f-09fe4a886459 Thomas Mortagne created this issue on 27/Mar/25 18:31
 
Summary: The group members cache can quickly end up being filled with users as key
Issue Type: cid:jira-generated-image-avatar-8d009a38-6c9c-485e-b886-264593d1b8d8 Bug
Affects Versions: 10.8-rc-1
Assignee: Unassigned
Components: User
Created: 27/Mar/25 18:31
Priority: cid:jira-generated-image-static-major-58c6a9b4-44ba-4861-acbe-5672c3b1b144 Major
Reporter: Thomas Mortagne
Description:

When loading a group, getMembers is also used for each member of the group, in case it's a group. The problem is that it means the cache can quickly get filled with users and push the groups themself out, making the cache quite useless when there is a lot of users.

To limit this effect, and as a bonus provide a new feature to the GroupManager, it would be interesting to introduce an isGroup(DocumentReference) and its corresponding cache which would be in charge of maintaining a big cache of boolean indicating if an entry is a group or not.

 
 

4 updates

 
cid:jira-generated-image-avatar-1c376040-2190-45d5-8b3f-09fe4a886459 Changes by Thomas Mortagne on 27/Mar/25 18:31
 
Description: When loading a group, getMembers is also used for each member of the group, in case it's a group. The problem is that it means the cache can quickly get filled with users and push the groups themself out, making the cache quite useless when there is a lot of users.

To limit this effect, and as a bonus provide a new feature to the GroupManager, it would be interesting to introduce an isGroup(DocumentReference) and its corresponding cache which would be in charge of maintaining a big cache of boolean indicating if an entry is a group or not.


The workaround to be safe is to set the size of the "user.membership.members" to at least (the number of users + the number of groups) x 2.
Assignee: Thomas Mortagne
Labels: performance
Status: Open In Progress