lp:~richardboulton/storm/sqlite-locked-recovery
- Get this branch:
- bzr branch lp:~richardboulton/storm/sqlite-locked-recovery
Branch merges
Related bugs
Bug #136771: If SQLite commit() fails, transaction status gets incorrectly cleared | Undecided | Fix Released |
Related blueprints
Branch information
Recent revisions
- 182. By Richard Boulton
-
Split test_recover_
after_timeout( ) into two - making a new test,
test_commit_timeout( ) to test the failure to enforce the timeout on commit(). - 181. By Richard Boulton
-
Move the code wihch sets _in_transaction to True to the right part of the
conditional - whoops. - 180. By Richard Boulton
-
Added comments explaining how this handles the case where pysqlite handles the
timeout correctly, as well as the case where it doesn't. - 179. By Richard Boulton
-
Move the check for a transaction still being in progress due to "database is
locked" errors from commit into _retry_until_timeout( ), to avoid having to have
a special case in commit(). - 177. By Richard Boulton
-
Only leave the _in_transaction flag as True if an exception occurs, and
that exception is an OperationalError("database is locked"). In other
situations, sqlite rolls back the transaction automatically.In rollback(), always set _in_transaction to False, even if the rollback
raises an exception. - 176. By Richard Boulton
-
Fix "OperationalError: cannot start a transaction within a transaction" failure
in test_recover_after_timeout( ), by setting self._in_ transaction = False after
COMMIT, instead of before (so that if an exception is thrown, we don't set
this).Similarly for rollback(), though if that fails we probably have bigger
problems. - 175. By Richard Boulton
-
Fix failure of commit() to enforce the timeout, by abstracting the code from
raw_execute which enforces the timeout, and reusing it for commit(). Don't
bother enforcing the timeout for rollback(), because this shouldn't ever fail
due to "database is locked" errors, anyway.Also, remove the "_started=None" parameter from raw_execute, since it was never
used, and start the timer before the first attempt to perform the execute,
rather than after the first failure. This should mean that, if pysqlite2
starts enforcing the timeout properly, we don't end up waiting for double the
timeout. - 174. By Richard Boulton
-
Add test showing the problems in 0.10 with recovery after a commit() fails, and
the failure of the timeout for commit() to be observed.