equal
deleted
inserted
replaced
45 def _acquire_unique_cstr_lock(cnx): |
45 def _acquire_unique_cstr_lock(cnx): |
46 """acquire the _UNIQUE_CONSTRAINTS_LOCK for the cnx. |
46 """acquire the _UNIQUE_CONSTRAINTS_LOCK for the cnx. |
47 |
47 |
48 This lock used to avoid potential integrity pb when checking |
48 This lock used to avoid potential integrity pb when checking |
49 RQLUniqueConstraint in two different transactions, as explained in |
49 RQLUniqueConstraint in two different transactions, as explained in |
50 http://intranet.logilab.fr/jpl/ticket/36564 |
50 https://extranet.logilab.fr/3577926 |
51 """ |
51 """ |
52 if 'uniquecstrholder' in cnx.transaction_data: |
52 if 'uniquecstrholder' in cnx.transaction_data: |
53 return |
53 return |
54 _UNIQUE_CONSTRAINTS_LOCK.acquire() |
54 _UNIQUE_CONSTRAINTS_LOCK.acquire() |
55 cnx.transaction_data['uniquecstrholder'] = True |
55 cnx.transaction_data['uniquecstrholder'] = True |