Newer Version Available
Granular Locking
By default, the Lightning Platform platform locks the entire group membership table to protect data integrity when Salesforce makes changes to roles and groups. This locking makes it impossible to process group changes in multiple threads to increase throughput on updates. When the granular locking feature is enabled, the system employs additional logic to allow multiple updates to proceed simultaneously if there is no hierarchical or other relationship between the roles or groups involved in the updates. Administrators can adjust their maintenance processes and integration code to take advantage of this limited concurrency to process large-scale updates faster, all while still avoiding locking errors.
- Groups that are in separate hierarchies are now able to be manipulated concurrently.
- Public groups and roles that do not include territories are no longer blocked by territory operations.
- Users can be added concurrently to territories and public groups.
- User provisioning can now occur in parallel.
- Portal user creation requires locks only if new portal roles are being created.
- Provisioning new portal users in existing accounts occurs concurrently.
- A single-long running process, such as a role delete, blocks only a small subset of operations.
This table lists all of the operations that can occur in parallel when granular locking is enabled. Note that certain operations, such as reparenting (moving roles within the role hierarchy), still block almost all other group updates.
1 The user must not own any partner or customer portal accounts.
2 Provisioning standard user or portal user in an existing portal role
3 Provisioning any standard or portal user, including the first portal user under an account
Who’s a Good Candidate for Granular Locking?
Customers may consider using granular locking if they experience frequent and persistent locking that severely restricts their ability to manage manual and automated updates at the same time, or severely degrades the throughput of integrations or other automated group maintenance operations. Customers who only occasionally receive an error message indicating that they have encountered a group membership lock are probably not good candidates for this feature.