[Sheepdog] Some setattr/getattr strangeness
Chris Webb
chris at arachsys.com
Thu Oct 13 16:52:56 CEST 2011
MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> writes:
> Chris Webb wrote:
>
> > Hi Kazutaka. Just double-checking, but is there a race here where the id is
> > allocated but the key isn't written yet, i.e. a getattr on another host
> > could see a value for the attribute but that value is an empty string
> > because the new object hasn't been written?
>
> Yes, there is... I believe this is the reason you got the empty
> attribute. I'll fix it.
>
> Should setattr without '-x' also work atomically? For example,
> multiple hosts may send setattr against the same existing attribute at
> the same time? Currently, this operation can cause replication
> inconsistency.
I don't rely on this myself at present, but it's probably the sort of thing
that would surprise other integrators in future, so I think I'd be tempted
to make them both atomic if that's not very difficult?
Best wishes,
Chris.
More information about the sheepdog
mailing list