← Back to team overview

maas-devel team mailing list archive

Re: Race in Node.acquire()?

 

On 05/04/2014 08:25 PM, Julian Edwards wrote:

> If a node is locked but would be available when freed, and no other
> nodes are available, what will your method do given that it is yet to
> consider all possible nodes?  Go back to blocking?

It fails immediately.  Seemed more appropriate than waiting and hoping.

But, the question may now be moot.  I discussed this problem with James
Troup and he found some great news:

    https://docs.djangoproject.com/en/1.6/ref/databases/

Look under PostgreSQL notes — as of Django 1.6, at least with postgres,
we can set the isolation level!

That does mean we need to consider retrying requests that run into
paradoxes.  Details in the documentation are still sketchy, so it's not
a given that we'll really be able to identify this type of failure, but
there are some things we can try.


Jeroen


References