← Back to team overview

maas-devel team mailing list archive

Re: Race in Node.acquire()?

 

On 04/30/2014 02:17 PM, Julian Edwards wrote:

>> That would do it.  We'd want to avoid blocking on it though, so we'd
>> need to pass “nowait” and back off to a second choice if the lock failed.
> 
> Why can't we block with a timeout, like LP?

Not a built-in option AFAIK.

And what would we be waiting for?  If the node is locked, it's probably
because someone else is already allocating it.

There will be other candidates that aren't locked, so we might as well
try to grab one of those.  (Or if there aren't, we have to disappoint
the caller anyway).


Jeroen


Follow ups

References