Tuesday, 17 November 2020

What is Granular locking?

 Hi,

Here let's see what is  Granular Locking Feature and its advantages.

Granular locking can help customers who experience locking issues("org" locks or lock errors). Without this feature, our code locks the entire table that keeps track of people’s membership in various groups. 

This means that any two administrative operations that change roles, public groups, or territories will conflict if they happen simultaneously. With granular locking, the code first analyses each operation and locks only the portions of the table touched by each. 

This makes it much less likely that any two group membership operations will conflict, and so customers who are using this feature will experience many fewer locks. In most cases, customers will find that with granular locking they can perform manual administration while automated update processes are running, and introduce some degree of multi-threading into integration code and other automated processes.

By default, granular locking is enabled, which allows some group maintenance operations 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.

How can I tell if I should use granular locking?

     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. Customers should consider using this feature only if they experience frequent and persistent locking that severely restricts their ability to manage both manual and automated updates at the same time, or severely degrades the throughput of integrations or other automated group maintenance operations.

Advantages:

  • 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.

Reference:

https://help.salesforce.com/articleView?id=000325942&type=1&mode=1

https://developer.salesforce.com/docs/atlas.en-us.draes.meta/draes/draes_group_membership_locking.htm

https://developer.salesforce.com/docs/atlas.en-us.210.0.draes.meta/draes/draes_tools_granular_locking.htm

3 comments:

  1. Hi!
    It was an interesting explanation about Granular Locking. But is there any disadvantage or important consideration to think about?
    Thanks in advance!

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi,
      I didn't see any disadvantages here. But always better to check how much this feature useful for our application.
      for more information you can check the following doc on Record Access for Enterprise Scale.
      https://resources.docs.salesforce.com/sfdc/pdf/draes.pdf

      Delete

What’s the difference between Einstein Article Recommendations and Suggested Articles?

How Does Einstein Article Recommendations Work? Einstein Article Recommendations helps support agents resolve customer cases efficiently by ...