PermissionManager slow performance

Steffen Prendke February 6, 2017

To change the permissions for a page or a blogpost I am using the PermissionManager. This is working fine in a smaller Confluence System but in an great system like our we get performance trouble. We want to edit existing group names, for this I need to change also the permissions to a new group name.

Example:

Group1 will be change to Group1a, so I must set all page and blogpost permissions from Group1 to Group1a.

To iterate over all pages in all spaces with all page ancestors need extremely much time, several hours. So to solve this performance problem, I am make an SQL Update statement on the CONTENT_PERM table. This is working as aspected, are maybe other changes needed which I don't see an the API will make?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2017

>I am make an SQL Update statement

Please tell me you are doing that while Confluence is off-line, and you take a backup first?

Steffen Prendke February 7, 2017

We want to do such scenarios every night. I am using a confluence job, inside that I am using a TransactionTemplate, we don't want to make every time a backup.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2017

No, you don't.  Do not amend the database of an Atlassian application without a full backup, and it being off line when you do it.  It will break.

Could you explain what you are trying to do here?  What is your database hack doing?

Steffen Prendke February 7, 2017

We want the possibility to change the group name. As I said, from Group1 to Group1a, Confluence doesn't support that, for Confluence is a group immutable, but we need this. So I am create a new group which bend all group rights from the old Group1 to the new group Group1a.
With the regular API from Confluence is this not possible (Job duration ~ 21h) 

UPDATE CONTENT_PERM
SET GROUPNAME = 'Group1a'
WHERE GROUPNAME = 'Group1';
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2017

Ok, that is really going to break all sorts of things in Confluence.

Do not do it.

Go back to your group maintenance and do it properly.  Groups should not change.  Membership of groups is totally mutable, it's fine to add and remove people from groups daily.  But if you are in a position where you want to change the name of a group more than once a year, you have got your group management utterly utterly wrong.

Steffen Prendke February 7, 2017

OK, as a hint for you, we will broadcast the organisational structure from an external database to confluence. From time to time the group name will be changing here. 

So, could you tell me how can I achieve a flexible group structure, which will broadcast the rights from the former group to the new group.

I think it's a normal process, in every organisation things will be changed, so maybe Confluence will offer in future releases an mutable group name.

TAGS
AUG Leaders

Atlassian Community Events