Changes between Initial Version and Version 1 of Ticket #37406


Ignore:
Timestamp:
Oct 7, 2026, 3:35:37 AM (2 hours ago)
Author:
Gavin Wahl(vendor)
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37406 – Description

    initial v1  
    33After that the connection is stuck. `in_atomic_block` is True with no atomic block on the stack, so nothing will ever commit. Once anything sets `needs_rollback` you get `TransactionManagementError` on every query. `close()` doesn't help because inside an atomic block it keeps the dead connection object around and waits for an `Atomic.__exit__` to reset it.
    44
    5 This doesn't affect manage.py migrate from a shell, since the process exits and the server rolls back. It matters if you catch the error and keep going, e.g. tests, `call_command("migrate")`, or a tool using MigrationExecutor directly.
     5This doesn't affect manage.py migrate from a shell, since the process exits and the server rolls back. It matters if you catch the error and keep going, e.g. tests, `call_command("migrate")`, or a tool using schema_editor directly.
    66
    77There is an existing `test_migrations_not_applied_on_deferred_sql_failure` but it has `atomic = False` so it doesn't hit this.
Back to Top