#23718: TEST_MIRROR setting doesn't work as expected (and has no tests)
-----------------------------------+-------------------------------------
Reporter: Ilya Baryshev | Owner: Rag Sagar
Type: Bug | Status: assigned
Component: Testing framework | Version: 1.7
Severity: Normal | Resolution:
Keywords: replica testing | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+-------------------------------------
Comment (by Simon Charette):
Rag Sagar, I'm afraid none of the above solution will work appropriately.
Here's the problem:
If you configure mirrors to create a new connection to mirrored connection
settings then changes performed within a transaction using the mirrored
connection won't be visible in the mirror connection per `READ COMMITED`
transaction isolation definition. That's the case right now.
Using `READ UNCOMMITTED` on the mirror connection seems to be a no-go from
limited support and the fact MySQL seems inconsistent and reusing the same
connection has confuses transaction management.
The only solutions I see going forward are:
1. Document this caveats of `TEST_MIRROR` and `TestCase` transaction
wrapping interactions.
2. Invest more time trying to get the `connections` repointing during
`TestCase.setUpClass` working to get the suite passing and document the
new caveats.
In both cases we could at least do 1. or warn about it to make it clear
this is not currently supported.
--
Ticket URL: <https://code.djangoproject.com/ticket/23718#comment:28>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.4c7a25df7cfb6bbce7fdca0f3d5bffff%40djangoproject.com.