Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: ResourcePermission Table
Hi I'm working with a liferay portal that is already on Production.
We hase some problem basically related to this issue: http://issues.liferay.com/browse/LPS-14135.
We've entry a lot of users doing some tests, and then we had to deleted these users. After thar the ResourcePermission table is populated with a lot of "obsolet data". Is there a way to delete these invalid entries from the database, I mean How can I see wich entries should I delete?
This table have like 500000 entries, and somethig like 4000 users
Thanks in advance!
We hase some problem basically related to this issue: http://issues.liferay.com/browse/LPS-14135.
We've entry a lot of users doing some tests, and then we had to deleted these users. After thar the ResourcePermission table is populated with a lot of "obsolet data". Is there a way to delete these invalid entries from the database, I mean How can I see wich entries should I delete?
This table have like 500000 entries, and somethig like 4000 users
Thanks in advance!
Resource permissions are just that, they are permissions on resources.
With 4000 users (active and inactive) but a lot of resources, the current resource permission record count may be accurate.
That said, it is inadvisable to manipulate the Liferay database directly. Liferay uses a database and a lucene index for storing a lot of stuff. Failure to remove records correctly can lead to a broken system.
Basically you should never have been using your production system for this kind of testing.
With 4000 users (active and inactive) but a lot of resources, the current resource permission record count may be accurate.
That said, it is inadvisable to manipulate the Liferay database directly. Liferay uses a database and a lucene index for storing a lot of stuff. Failure to remove records correctly can lead to a broken system.
Basically you should never have been using your production system for this kind of testing.
Thanks Davis, I agree with you, the problem is the CPU seems to be veeery busy doing queries on this table.
I saw on the resourcePermission table doing this query:
"select count(resourcepermissionid),"name",primkey,roleid,actionids
from resourcepermission
where scope = 4
group by "name",primkey,roleid,actionids
having count(resourcepermissionid) > 1
order by count(resourcepermissionid)"
where we have o lot of duplicate entries, the question is , the resourcepermissionid is used in any other table as a relationship?
Thanks!
I saw on the resourcePermission table doing this query:
"select count(resourcepermissionid),"name",primkey,roleid,actionids
from resourcepermission
where scope = 4
group by "name",primkey,roleid,actionids
having count(resourcepermissionid) > 1
order by count(resourcepermissionid)"
where we have o lot of duplicate entries, the question is , the resourcepermissionid is used in any other table as a relationship?
Thanks!
David H Nebinger:
Resource permissions are just that, they are permissions on resources.
With 4000 users (active and inactive) but a lot of resources, the current resource permission record count may be accurate.
That said, it is inadvisable to manipulate the Liferay database directly. Liferay uses a database and a lucene index for storing a lot of stuff. Failure to remove records correctly can lead to a broken system.
Basically you should never have been using your production system for this kind of testing.
Joaquin Cabal:
where we have o lot of duplicate entries, the question is , the resourcepermissionid is used in any other table as a relationship?
Probably. Liferay treats the database as their own black box. FKs are not created nor enforced, and the virtual table relationships are undocumented also.
That's why deleting rows from the database is so precarious - there is no way to determine where rows might be referenced from what other tables. It gets even more complex since the algorithm for permissions can be changed, so identifying your algorithm and determining which rows to delete will be somewhat overwhelming, IMHO.
Ok, Thanks a lot!
I'll go with the posible solution on the LPS
I'll go with the posible solution on the LPS
I've heard about this problem too. Luckily the person detected this during test and decided to use newer liferay version.
As David said, it's not wise to execute sql commands in production system. I'll go with the recommended solution in the LPS.
As David said, it's not wise to execute sql commands in production system. I'll go with the recommended solution in the LPS.