Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Rollback any pending transactions prior to reloading schema #27

Merged
merged 1 commit into from
Jun 10, 2014

Conversation

raizyr
Copy link
Contributor

@raizyr raizyr commented Jun 9, 2014

Issue #26 appears to be related to aggressive locking that is not present in sqlite. Issuing a session.rollback() prior to reloading schema seems to fix the hanging.

@stevearc
Copy link
Owner

stevearc commented Jun 9, 2014

Have you tested this? I feel like you would have to call transaction.abort() instead of self.db.rollback() since the engine is using the zope transaction extension.

@raizyr
Copy link
Contributor Author

raizyr commented Jun 10, 2014

I have tested insofar as I'm currently using a patched version. In tracking it down, the schema drop seemed to be waiting on a lock caused by SqlCache.distinct, although I couldn't find any indication of why a query would lock. Adding the self.db.rollback stopped the waiting for lock.

@stevearc
Copy link
Owner

Fair enough. I'll merge this into the 0.2 branch and cut a new release

@stevearc stevearc merged commit 44029be into stevearc:master Jun 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants