To switch from fork to spawn, state setup will be handled by spawned processes instead of through inheritance via fork. Worker’s connections to databases can still be done through get_test_db_clone_settings which changes the names of databases assigned to a specific worker_id; however, SQLite's cloning method is incompatible with spawn.
SQLite’s cloning method relies on it both being in-memory and fork as when we fork the main process, we retain SQLite's in-memory database in the child process. The solution is to get a SQL dump of the database and throw it into the target cloned databases. This is also the established standard in handling MySQL’s cloning process. Both Postgresql's and MySQL's cloning methods are independent of fork or spawn and won't require any modification.
Oracle has not been implemented in the parallel test runner originally even on Linux and I propose to extend support to Oracle as well in my proposal. I want to confirm if there is significant support behind this as a feature or not before I commit to writing a specification, but as a summary it is definitely possible as the work collaborated on by Aymeric Augustin and Shai Berger show that cloning CAN be done through multiple ideas. The reason why it's a headache is that Oracle does not support separate databases under a single user- unlike our other supported databases, so we can't clone databases without introducing another user. Some methods may also need to be rewritten to accommodate for the Oracle backend, but that isn't an issue. I've glossed over writing out a schedule or a more detailed abstract as I I'm mainly posting here to see if there is indeed support for the Oracle proposal and to make sure I am not missing any details in regards to adapting the current parallel test runner to work through spawn. Let me know what you think.
Regards,
Ahmad
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/317f67c6-4b23-483f-ada5-9bdbb45d0997%40googlegroups.com.
> incompatible in macOS due to a recent updateCan you elaborate on this a bit? How has a recent update made forking incompatible on MacOS?
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/322804F5-F44F-4EF8-AF33-C460EC509915%40tomforb.es.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e5a1464f-553c-4990-8dd2-6c4086e329c4%40googlegroups.com.
--Aymeric.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
Currently what I'm figuring out is getting a SQL dump to change SQLite's cloning method and implementing an Oracle cloning method. I'm searching through Django's documentation and internal code to see if there is a ready-made SQL dump method for SQLite and if not I'll search for it in a third-party library, and if I still don't find it, I'll start thinking about a ground-up implementation using the ORM.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1e185df6-e6ea-4066-84b5-c2e0a150239a%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM1YU51rQZHARD0NRNKDyY0mEnt8XDPWAyyp%3DbPeT0bsqg%40mail.gmail.com.
On 30 Mar 2020, at 08:13, Ahmad A. Hussein <ahmadah...@gmail.com> wrote:
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uNa8rCj_d%2BLt00HceLP97QmbPM6UTRV%3DqpAmmgu8pC23w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5217A362-5132-4319-9F1F-E8EBA049CB4E%40tomforb.es.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uPOr_v8ggOCyNh09NARSWXFf-gGvbnHoG3nSxft_SbHZg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8743CDFB-32AF-477F-8AE5-514A8E953159%40tomforb.es.
I just finished rewriting it to re-run migrations and setup in each worker. I didn't bench mark it so I'll do that again later, but as a gut reaction it isn't significantly slower; but of course the numbers will tell the real story.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uOi-6NYi7i_QN9axQidwWd%3Dqq924afcWHHihvHnXd%3DpHw%40mail.gmail.com.
Tom
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/1e185df6-e6ea-4066-84b5-c2e0a150239a%40googlegroups.com.
--Adam--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM1YU51rQZHARD0NRNKDyY0mEnt8XDPWAyyp%3DbPeT0bsqg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uNa8rCj_d%2BLt00HceLP97QmbPM6UTRV%3DqpAmmgu8pC23w%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5217A362-5132-4319-9F1F-E8EBA049CB4E%40tomforb.es.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uPOr_v8ggOCyNh09NARSWXFf-gGvbnHoG3nSxft_SbHZg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8743CDFB-32AF-477F-8AE5-514A8E953159%40tomforb.es.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAJNa-uOi-6NYi7i_QN9axQidwWd%3Dqq924afcWHHihvHnXd%3DpHw%40mail.gmail.com.
--Adam
On 30 Mar 2020, at 19:41, charettes <chare...@gmail.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/017dbc0f-cc05-4bbc-9ec1-2676a64693fd%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/86226E01-7850-4CE8-BF11-E229FEE6AEC9%40tomforb.es.