|
From: | Ravishankar N |
Subject: | Re: [Gluster-devel] [Gluster-users] Fencing FOPs on data-split-brained files |
Date: | Wed, 08 Jan 2014 15:34:42 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Hi,
Based on an internal discussion we had, I am putting forward some points on the proposed changes: lookup: For files in data split-brain (DSB), allow lookup to succeed and return the inode attributes (struct iatt) from the file which has the bigger size. For files in metadata split-brain (MSB), allow lookup to succeed and use the below resolution:
For files in entry split-brain (ESB), lookup has to fail. Note that if lookup gets called before the other FOPS, then the above is the expected behaviour. If it doesn't (due to caching, or the split brain occurring after lookup happens etc), then we need to define what happens on each FOP: stat: If file is in split-brain, send stat to all subvolumes,and perform the same steps as done in lookup (i.e. perform same checks as above). write: Allow writes to go through irrespective of the type of split-brain. This is in marked difference with the current behaviour where we disallow writes to DSB files.The rationale is that the write could include a truncate to zero, which is a valid use case for resolving the split-brained file if the user wishes to do so. read: Do not allow reads irrespective of the type of split-brain. This would serve as a indication to user that file is in split-brain. get(f)attr: For DSB, allow it. For MSB, Don't allow. set(f)attr: For DSB and MSB, allow it. touch (create), hardlink, softlink, rename, chown, chmod, unlink:Allow the operation for all type of split-brains Forcing look ups to occur for readdirp:If a directory is in split brain and a readdirp is issued, after getting the entries, AFR needs to check them for split-brains and for those entries which are in split-brain,it needs to set the inode to null before unwinding the reply to the parent xlator. What we are essentially doing here is downgrading a readdirp to a readdir, thereby ensuring that a lookup is always triggered if that file is accessed again. Thanks, Ravi On 12/27/2013 04:40 PM, Ravishankar N wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |