path: root/geo-replication
diff options
authorVenky Shankar <>2013-08-21 16:33:41 +0530
committerAnand Avati <>2013-09-04 20:52:02 -0700
commit8910136c09e11f651fe846e3f357341b9260930e (patch)
tree39c0fb41cf2b6beb26aa15ee6adac17ed62c4948 /geo-replication
parentaa292ab99c9db37dd5080aa5d65f24a8887b855b (diff)
gsyncd / geo-rep: overload rename with an unlink
This is certainly a "hack" for cases when after a rename the gfid is unlinked (which is now pointed by a different pargfid/basename). This was osbserved when a file edited (uisng vi/vim) on the glusterfs mount point which has a geo-replication session running. Change-Id: I0a5d9f0f549aa4403671fa1f11e95510142e5720 BUG: 1003800 Signed-off-by: Avra Sengupta <> Signed-off-by: Venky Shankar <> Reviewed-by: Amar Tumballi <> Tested-by: Amar Tumballi <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'geo-replication')
1 files changed, 4 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/ b/geo-replication/syncdaemon/
index 1ef760619..ef151a32a 100644
--- a/geo-replication/syncdaemon/
+++ b/geo-replication/syncdaemon/
@@ -685,7 +685,10 @@ class GMasterChangelogMixin(GMasterCommon):
go = os.path.join(pfx, gfid)
st = lstat(go)
if isinstance(st, int):
- logging.debug('file %s got purged in the interim' % go)
+ if ty == 'RENAME':
+ entries.append(edct('UNLINK', gfid=gfid, entry=en))
+ else:
+ logging.debug('file %s got purged in the interim' % go)
entry_update(go, st.st_size, st.st_mode)
if ty in ['CREATE', 'MKDIR', 'MKNOD']: