← Back to team overview

maas-devel team mailing list archive

Re: Running with serializable isolation.

 

On Wednesday 22 Oct 2014 22:41:19 Christian Robottom Reis wrote:
> My question is what SERIALIZABLE with blanket-retry would do to the use
> cases I presented in my previous email. I believe it will cause some
> form of dataloss, and if so, we should consider our options carefully.

It's a good point.

Now that we are more aware of this in the future, it should be easy to 
construct database updates such that they merge, or fail with a good error 
when the retry kicks in.  This has to be at the discretion of anything that 
changes data for reasons described already in this thread.  It may be as 
explicit as an exclusive lock that is taken before any form data validation, 
or we could just say "latest update wins" depending on the situation.

We will need to audit existing code where it makes changes to ensure that this 
all happens correctly, however.


References