diff options
author | Venky Shankar <vshankar@redhat.com> | 2013-08-21 16:33:41 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-09-04 20:52:02 -0700 |
commit | 8910136c09e11f651fe846e3f357341b9260930e (patch) | |
tree | 39c0fb41cf2b6beb26aa15ee6adac17ed62c4948 /geo-replication/syncdaemon/master.py | |
parent | aa292ab99c9db37dd5080aa5d65f24a8887b855b (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 <asengupt@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/5755
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/master.py')
-rw-r--r-- | geo-replication/syncdaemon/master.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 1ef76061976..ef151a32ad6 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -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) continue entry_update(go, st.st_size, st.st_mode) if ty in ['CREATE', 'MKDIR', 'MKNOD']: |