[GSOC] Multi-DB Week 0 Update
Hey all, GSOC is officially scheduled to start tomorrow (my time), however I've take the liberty of getting quite a jump on my work (as I described last week). During this week I got the save using parameter and using queryset method, these are fairly untested however. The reason for this was after updating the management commands and testing harness for multiple database support any fixtures being loaded would be loaded N time (where N is the number of dbs in your settings.DATABASES setting), so I needed to make sure each fixture got loaded into each DB, this meant adding the using parameter to save, which also uses querysets... and it was turtles all the way down :) So while that's basically working, the test suite as a whole is still not passing (http://paste.pocoo.org/show/118532/ is the results for me). The reason for this (as best I can tell) is that Postgresql runs DDL operations inside a transaction, and since transaction support isn't actually working across DB at this point the CREATE TABLE statements never actually get committed. Which brings us to the problem: updating the transaction stuff in itself isn't a huge task, and making django use transaction stuff where necessary isn't tremendously onerous. However, one of -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Multi-DB Week 0 Update
Hey Alex, Not sure if this is the right place, but I guess you're the right person to ask.. Will Multi-BD be flexible enough that it will allow to choose a DB at runtime, depending on something like the user or the domain and not tied to models at all? From what I've read that's not possible right now (don't need to change backends, just database name, password and server), and it's also not easy. Thanks, Marco On May 23, 5:05 am, Alex Gaynor wrote: > Hey all, > > GSOC is officially scheduled to start tomorrow (my time), however I've take > the liberty of getting quite a jump on my work (as I described last week). > During this week I got the save using parameter and using queryset method, > these are fairly untested however. The reason for this was after updating > the management commands and testing harness for multiple database support > any fixtures being loaded would be loaded N time (where N is the number of > dbs in your settings.DATABASES setting), so I needed to make sure each > fixture got loaded into each DB, this meant adding the using parameter to > save, which also uses querysets... and it was turtles all the way down :) > > So while that's basically working, the test suite as a whole is still not > passing (http://paste.pocoo.org/show/118532/is the results for me). The > reason for this (as best I can tell) is that Postgresql runs DDL operations > inside a transaction, and since transaction support isn't actually working > across DB at this point the CREATE TABLE statements never actually get > committed. Which brings us to the problem: updating the transaction stuff > in itself isn't a huge task, and making django use transaction stuff where > necessary isn't tremendously onerous. However, one of > > -- > "I disapprove of what you say, but I will defend to the death your right to > say it." --Voltaire > "The people's good is the highest law."--Cicero --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: Multi-DB Week 0 Update
If you recall the conversation between Alex and Simon, it will support this. -justin On May 29, 2009, at 9:29 AM, Marco Louro wrote: > > Hey Alex, > > Not sure if this is the right place, but I guess you're the right > person to ask.. > > Will Multi-BD be flexible enough that it will allow to choose a DB at > runtime, depending on something like the user or the domain and not > tied to models at all? From what I've read that's not possible right > now (don't need to change backends, just database name, password and > server), and it's also not easy. > > > Thanks, > Marco > > > On May 23, 5:05 am, Alex Gaynor wrote: >> Hey all, >> >> GSOC is officially scheduled to start tomorrow (my time), however >> I've take >> the liberty of getting quite a jump on my work (as I described last >> week). >> During this week I got the save using parameter and using queryset >> method, >> these are fairly untested however. The reason for this was after >> updating >> the management commands and testing harness for multiple database >> support >> any fixtures being loaded would be loaded N time (where N is the >> number of >> dbs in your settings.DATABASES setting), so I needed to make sure >> each >> fixture got loaded into each DB, this meant adding the using >> parameter to >> save, which also uses querysets... and it was turtles all the way >> down :) >> >> So while that's basically working, the test suite as a whole is >> still not >> passing (http://paste.pocoo.org/show/118532/is the results for >> me). The >> reason for this (as best I can tell) is that Postgresql runs DDL >> operations >> inside a transaction, and since transaction support isn't actually >> working >> across DB at this point the CREATE TABLE statements never actually >> get >> committed. Which brings us to the problem: updating the >> transaction stuff >> in itself isn't a huge task, and making django use transaction >> stuff where >> necessary isn't tremendously onerous. However, one of >> >> -- >> "I disapprove of what you say, but I will defend to the death your >> right to >> say it." --Voltaire >> "The people's good is the highest law."--Cicero > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: [GSOC] Multi-DB Week 0 Update
And I didn't actually finish writing before sending grand... So the issue is one of the remaining 1.1 tickets, http://code.djangoproject.com/ticket/9964 , has patches that rewrite basically all of the transaction handling code. Can anyone comment on whether those patches are likely to be representative of the final code here, as I'd really like to avoid doing all the work twice. Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---
Re: [GSOC] Multi-DB Week 0 Update
On Sat, May 23, 2009 at 12:06 PM, Alex Gaynor wrote: > And I didn't actually finish writing before sending grand... > > So the issue is one of the remaining 1.1 tickets, > http://code.djangoproject.com/ticket/9964 , has patches that rewrite > basically all of the transaction handling code. Can anyone comment on > whether those patches are likely to be representative of the final code > here, as I'd really like to avoid doing all the work twice. I've been working my way through the remaining 1.1 tickets; I haven't looked at #9964 yet, but I'll put it on my list of things to look at RSN. Russ %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~--~~~~--~~--~--~---