Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNABLE_TO_LOCK_ROW exception while Merging Contacts via Plauti Duplicate Check #1478

Open
kanavmuscle opened this issue Jun 19, 2024 · 4 comments
Labels

Comments

@kanavmuscle
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

Merge a Contact using the Plauti Duplicate Check (https://www.plauti.com/products/salesforce/duplicate-check)

Expected behavior
The Contact merge should happen without any errors.

Screenshots
Error message:
Screenshot 2024-06-19 at 10 38 25

Debug Logs:
thumbnail_Image_2024-06-19_12-58-18

Note: As you can see, the exception is thrown as soon as the transaction flow enters the DLRS package.

Additional context

  • Plauti is a managed package as well
@kanavmuscle kanavmuscle changed the title UNABLE_TO_LOCK_ROW exception UNABLE_TO_LOCK_ROW exception while Merging Contacts via Plauti Duplicate Check Jun 19, 2024
@aheber
Copy link
Contributor

aheber commented Jun 26, 2024

@kanavmuscle what version of DLRS are you running?

@kanavmuscle
Copy link
Author

kanavmuscle commented Jun 27, 2024 via email

@aheber
Copy link
Contributor

aheber commented Jun 27, 2024

Newer DLRS versions (v2.21 is the most recent) include a small amount of help in this domain but not much.

None of the realtime updates include explicit locking behavior, only the necessary locking to update the record. DLRS also doesn't use multiple transactions so if this transaction locked the record it would be fine, something else is likely spawning a record lock in parallel, it is possible that the other transaction is also triggering DLRS to act which could, in a narrow way, cause DLRS to fight itself but DLRS wouldn't be the instigator for that.

I don't think DLRS would be able to make any reasonable changes to improve this, aside from testing with the latest version which avoids writing value to parents if they would be the same (which may or may not help you). You may need to look at either moving to a scheduled calculation mode so we don't try and update the master record right away or moving to a scheduled full calculate so you don't need any trigger or monitoring on the contact at all.

@kanavmuscle
Copy link
Author

kanavmuscle commented Jun 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants