Changes between Initial Version and Version 1 of Ticket #32527
- Timestamp:
- Mar 9, 2021, 3:29:53 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32527
- Property Resolution → needsinfo
- Property Status new → closed
-
Ticket #32527 – Description
initial v1 8 8 9 9 The problem stems from the following code of __enter__ function in transaction.py 10 10 {{{ 11 11 if self.savepoint and not connection.needs_rollback: 12 12 sid = connection.savepoint() … … 14 14 else: 15 15 connection.savepoint_ids.append(None) 16 16 }}} 17 17 Basically, a None is inserted in the savepoint_ids when the savepoints are not supported. And the following code in __exit__ function of transaction.py, it sets needs_rollback as true: 18 18 {{{ 19 19 if sid is None: 20 20 connection.needs_rollback = True 21 21 }}} 22 22 Can someone please clarify if this is an issue with the code or there is something else that we can do at our layer. For the time being, we have overridden the function savepoint of DatabaseWrapper to return 1. And, we ask the users of our backend to not set savepoint=true in parameters of transaction.atomic(). 23 23 {{{ 24 24 def savepoint(self): 25 25 return 1 26 }}}