diff -r 1b0cb3c6c95e -r ab956b780d4e server/session.py --- a/server/session.py Wed Jul 30 22:26:18 2014 +0200 +++ b/server/session.py Mon Dec 01 11:13:10 2014 +0100 @@ -1074,8 +1074,13 @@ cstate = self.commit_state if cstate == 'uncommitable': raise QueryError('transaction must be rolled back') - if cstate is not None: + if cstate == 'precommit': + self.warn('calling commit in precommit makes no sense; ignoring commit') return + if cstate == 'postcommit': + self.critical('postcommit phase is not allowed to write to the db; ignoring commit') + return + assert cstate is None # on rollback, an operation should have the following state # information: # - processed by the precommit/commit event or not