lp:~richardboulton/storm/sqlite-locked-recovery

Created by Richard Boulton and last modified
Get this branch:
bzr branch lp:~richardboulton/storm/sqlite-locked-recovery
Only Richard Boulton can upload to this branch. If you are Richard Boulton please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Richard Boulton
Project:
Storm
Status:
Merged

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().

178. By Richard Boulton

Fix a comment.

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.

173. By Christopher Armstrong

add a README file describing how to run the tests [trivial]

This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.