<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:10pt;color:#000000;background-color:#FFFFFF;font-family:'Courier New',monospace;">
<p>Hi,<br>
<br>
We recently started testing cloudsync xlator on a replica volume.<br>
And we have noticed a few issues. We would like some advice on how to proceed with them.<br>
<br>
</p>
<p><span style="font-size: 10pt;">1) As we know, when stubbing a file</span><span style="font-size: 10pt;"> cloudsync uses mtime of files to decide whether a file should be truncated or not.</span></p>
<p>If the mtime provided as part of the setfattr operation is lesser than the current mtime of the file on brick, stubbing isn't completed.</p>
<p>This works fine in a plain distribute volume. <span style="font-size: 10pt;">B</span><span style="font-size: 10pt;">ut i</span><span style="font-size: 10pt;">n case of a replica volume, the mtime</span><span style="font-size: 10pt;"> could be different for
the files on each of the replica </span><span style="font-size: 10pt;">brick.</span></p>
<p><br>
During our testing we came across the following scenario for a replica 3 volume with 3 bricks:<br>
<br>
We performed `setfattr -n "trusted.glusterfs.csou.complete" -v m1 file1` from our gluster mount to stub the files.<br>
It so happened that on brick1 this operation succeeded and truncated file1 as it should have. But on brick2 and brick3, mtime found on file1<br>
was greater than m1, leading to failure there.<br>
<br>
From AFR's perspective this operation failed as a whole because quorum could not be met. But on the brick where this setxattr succeeded, truncate was already performed. So now we have one of the replica bricks out of sync and AFR has no awareness of this.
This file needs to be rolled back to its state before the<br>
</p>
<p>setfattr.<br>
<br>
Ideally, it appears that we should add intelligence in AFR to handle this. <span style="font-family: "Courier New", monospace; font-size: 13.3333px; background-color: rgb(255, 255, 255);">How do you suggest we do that?</span><br>
</p>
<p><span style="font-family: "Courier New", monospace; font-size: 13.3333px; background-color: rgb(255, 255, 255);">The case is also applicable to EC volumes of course.<br>
<br>
2) Given that cloudsync depends on mtime to make the decision of truncating, how do we ensure that we don't end up in this situation again?<br>
<br>
Thanks,<br>
Anuradha</span></p>
<div>***************************Legal Disclaimer***************************<div>"This communication may contain confidential and privileged material for the<div>sole use of the intended recipient. Any unauthorized review, use or distribution<div>by others is strictly prohibited. If you have received the message by mistake,<div>please advise the sender by reply email and delete the message. Thank you."<div>**********************************************************************</body>
</html>