locked
Locking when updating records RRS feed

  • Question

  • Hi, we need your assistance in the following:
    when we are deleting record from entity A the plagin logic updates related record from entity B (A:B = N:1 relationship).
    If we start this process simultaneuosly as a result of  multiple user actions on many DIFFERENT records (from entity A) we face
    deadlock error/ Generic SQL error. Out traces show that the issue is related with these tables, they are locked.
    We use plagin which is  working in sandbox mode, and its steps are running synchronously.
    We need to understant the reasons of  this error:
    - Could this happen because of update/delete/insert transactions, and if so, how could  we fix it?
    As far as we know we can't  use WITH (NOLOCK) statement in these cases.
    We use NOLOCK=true only in select  queries. Please help.
    Also, we need to know, is it possible to lock tables when doing  REST queries (select/update/delete/insert) from javascript code?
    Please provide us detailed info about locking issue as we don't have a good background in these areas:
      is entire table becomes locked, or only records which are processed?  
    We would point to the fact that this happens on different records (both from A, B entities).
    Thank you in a advance.



    • Edited by beckyshar Friday, July 26, 2013 9:12 PM
    Friday, July 26, 2013 8:55 PM