equal
deleted
inserted
replaced
1072 # we are inside ensure_cnx_set, don't lose it |
1072 # we are inside ensure_cnx_set, don't lose it |
1073 free_cnxset = False |
1073 free_cnxset = False |
1074 cstate = self.commit_state |
1074 cstate = self.commit_state |
1075 if cstate == 'uncommitable': |
1075 if cstate == 'uncommitable': |
1076 raise QueryError('transaction must be rolled back') |
1076 raise QueryError('transaction must be rolled back') |
1077 if cstate is not None: |
1077 if cstate == 'precommit': |
|
1078 self.warn('calling commit in precommit makes no sense; ignoring commit') |
1078 return |
1079 return |
|
1080 if cstate == 'postcommit': |
|
1081 self.critical('postcommit phase is not allowed to write to the db; ignoring commit') |
|
1082 return |
|
1083 assert cstate is None |
1079 # on rollback, an operation should have the following state |
1084 # on rollback, an operation should have the following state |
1080 # information: |
1085 # information: |
1081 # - processed by the precommit/commit event or not |
1086 # - processed by the precommit/commit event or not |
1082 # - if processed, is it the failed operation |
1087 # - if processed, is it the failed operation |
1083 debug = server.DEBUG & server.DBG_OPS |
1088 debug = server.DEBUG & server.DBG_OPS |