QUESTION:
I am getting the following error(s) occasionally from DupeBlocker, what should I do?
DupeBlocker has encountered an error. Please contact your Salesforce
administrator with the following information:
*** Trigger: Contact after update
*** isMerge value: false
*** Trigger.new size: 1
*** Trigger.old size: 1
*** Exception Type: System.DmlException
*** Exception Cause: null
*** Exception Message: Insert failed. First exception on row 0; first
error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this
record: []
ANSWER:
This is a server side error from Salesforce which happens sporadically when Salesforce servers are experiencing high load and should not happen very often UNLESS using the Salesforce Data Loader or DemandTools with Bulk API enabled and NOT switching to "serial mode".
Bulk API uses Parallel processing by default, and this can result in "database contention" which can cause this error to be a more frequent occurrence. Per Salesforce's Help (https://help.salesforce.com/apex/HTViewHelpDoc?id=loader_configuring_bulk_api.htm&language=en)
The primary effect of this error is that the matching keys for these particular records weren't created or updated, but your insert, update or delete succeeded without issue. The matching keys for these records will be updated the next time the record is updated or the next time DupeBlocker scenario keys are rebuilt.
To ensure all keys are up to date after receiving this error it is recommended that a "rebuild all keys" is done.
Most likely it was just a timing issue, and you won't see these errors on any kind of regular basis unless using the Salesforce Data Loader or DemandTools with Bulk API enabled and parallel processing.
NOTE: If Bulk API is being used to initially load data into a new, non-live instance of Salesforce with DupeBlocker installed, it is recommended that all DupeBlocker scenarios be marked as UN-DEPLOYED so that DupeBlocker keys ARE NOT built as the records are being uploaded. This will not only speed up the upload but will avoid encountering these errors. Once all the data has been uploaded successfully, deploy the DupeBlocker scenarios and BUILD/REBUILD the DupeBlocker keys.
If using DupeBlocker 3, check the option in DupeBlocker Settings to "Disable DupeBlocker" vs. un-deploying each individual scenario.