title: Salesforce.com: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record
body: <p>In our production org, we have a system of uploading sales data into Salesforce using command line data loader. This data is loaded into a temporary object <strong>Temp</strong>.  We have created a formula field (which combines three fields) to form a unique key. The purpose of the object is to reduce user efforts for creating the key manually. </p>
  
  <p>There is an after insert trigger on <strong>Temp</strong>  which calls an asynchronous method which upserts the data to another object <strong>SalesData</strong> using the key. The insert/update trigger on <strong>SalesData</strong> checks the various fields and creates/updates the records in another object <strong>SalesRecords</strong>.  After the insertion/updation is complete, all the records in temp object <strong>Temp</strong>  are deleted. The <strong>SalesRecords</strong> object does not have any trigger on it and is a child of another object <strong>Sales</strong>. The <strong>Sales</strong> object has some rollup fields which are summing up fields from <strong>SalesRecords</strong> object.</p>
  
  <p>Lately, we are getting the below error for some of the records which are updated. 
      UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record</p>
  
  <p>Please provide some pointers to resolve the issue</p>