-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix issue #230 -- do not check isolation level in aborted transactions #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looking at this it might be better to just do: in there. |
|
Yeah, let's go with the simpler version, @akaariai |
|
@akaariai any news on that? |
|
I had forgotten all about this. I modified the patch to do the try-except thing. In addition, there is a test in [https://github.com/akaariai/django-debug-toolbar/commit/d9e9bf38cd4f4bd965065fe6380cfa47cea35197] but I didn't figure how to test this properly (without modifying the main settings), so this is non-committable. |
On PostgreSQL when the transaction is in aborted status, checking connection.isolation_level will result in an error.
|
@akaariai we could probably run the tests on postgres by extending the travis configuration and skip the test if the configured database isn't a postgres db. what do you think? |
Also added a dummy test_pgsql settings file.
|
I updated the patch so that running tests using "DJANGO_SETTINGS_MODULE=test_pgsql python runtests.py" is now possible. Along that path I had to fix another issue when using connections with alias not in django.db.connections. |
|
Good request! |
|
Any news on this? Is this going to be merged any time soon? Thanks! |
|
Got bitten by this issue the other day, would be great if a fix could be merged 👍 |
|
I also just got bit by this issue. I also think #351 is because of this. Does DatabaseError also catch IntegrityError? Otherwise it should probably read |
|
Hmm, I hate to have to write, me too. But any reason this got not merged yet? Can we help in any way on this? |
On PostgreSQL when the transaction is in aborted status, checking
connection.isolation_level will result in error because doing queries
in aborted transactions is illegal. Fixed this by skipping the
isolation level check when the transaction is aborted.