Fwd: [Gluster-devel] proposals to afr

Kevan Benson kbenson at a-1networks.com
Thu Oct 25 19:08:55 UTC 2007


Krishna Srinivas wrote:
>>> My thought above was a simple flag as to whether or not the file was
>>> bing written just to denote whether it should be considered in a
>>> consistent state if a crash happens.
> 
> This will not work because, setting the flag before write() and resetting
> after write() will be expensive interms of cpu cycles (debatable)
> 
> Also suppose we have set the flag before write(), another client sees
> that this flag is set on open() and takes wrong action (returning EIO) it is not
> correct behavior.

I was SO willing to let this thread die at Alexey's suggestion, and you 
had to pull me back in.  ;)

I think the simplest solution that Alexey and I came up with was not to 
set the flag before and after write, but before and after open, as in this:

Open() {
	trusted_afr_open=1;
}

Close() {
	trusted_afr_open=0;
	trusted_afr_version++;
}


So, if the trusted_afr_version is the same across the board but the 
rusted_afr_open attribute is set and NO processes have the file open, 
you know it's possible it could be in an inconsistent state (probably 
only slightly inconsistent, but possible).  In that case you would want 
to self-heal from one afr subvolume to the others.

Anyways, you guys will have a much better idea of how feasible this 
actually is.

-- 

-Kevan Benson
-A-1 Networks





More information about the Gluster-devel mailing list