Issue
- Unable to give 'view' permission to a folder that contains a huge number of files. That is,
- For a particular folder consisting of a very huge number of documents (nearly more than 50k docs), giving 'view' permission to any of the roles to that folder and try to save, the saving activity is taking a very long time.
- At the same time, giving any other permission (like the update, subscribe) except 'view' to the same folder and save, it gets saved immediately.
- The reported behaviour is specific to 'view' permission and that too specific to the folder
- The following Thread is observed in the thread dumps while the behaviour is observed on UI.
at com.liferay.sync.service.persistence.impl.SyncDLObjectPersistenceImpl.findByR_P(SyncDLObjectPersistenceImpl.java:1333)
at com.liferay.sync.service.persistence.impl.SyncDLObjectPersistenceImpl.findByR_P(SyncDLObjectPersistenceImpl.java:1231)
at com.liferay.sync.service.persistence.impl.SyncDLObjectPersistenceImpl.findByR_P(SyncDLObjectPersistenceImpl.java:1191)
at com.liferay.sync.service.impl.SyncDLObjectLocalServiceImpl.getSyncDLObjects(SyncDLObjectLocalServiceImpl.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:163)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:54)
at com.liferay.sync.internal.model.listener.SyncBaseModelListener.updateSyncDLObject(SyncBaseModelListener.java:69)
at com.liferay.sync.internal.model.listener.ResourcePermissionModelListener.onBeforeCreate(ResourcePermissionModelListener.java:45)
at com.liferay.sync.internal.model.listener.ResourcePermissionModelListener.onBeforeCreate(ResourcePermissionModelListener.java:30)
at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.updateResourcePermission(ResourcePermissionLocalServiceImpl.java:1437)
at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.setResourcePermissions(ResourcePermissionLocalServiceImpl.java:1201)
Environment
Resolution
- The issue is related to Liferay Sync Connector. The Sync updates all of a user's objects to reflect their new permissions. This consumes time to update the permission. Hence, the issue will not be observed after removing the Liferay Sync.
-
In case, the requirement does not allow to remove the Liferay Sync connector from the portal, the issue is fixed in the latest version of Liferay Sync Connector i.e. after Liferay Sync Connector 4.1.4 or you can raise a support ticket on Help Center to get a fix.