Legacy Knowledge Base
Published Jul. 2, 2025

Assignment of 'View' Permission for a folder having too many documents is taking longer time.

Written By

Prarthana Jadhav

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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

  • Liferay DXP 7.0

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.

Additional Information

  • The issue was reported in SYNC-1802
  • The latest version of Liferay Sync Connector can be downloaded from the Marketplace.
Did this article resolve your issue ?

Legacy Knowledge Base