From 3c29c50cf60135245290133fbfed11aa3cf01e39 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Wed, 17 Sep 2014 12:59:52 +0530 Subject: geo-rep: fix same file different gfid in master and slave While processing RENAME in changelog, if the file is unlinked in master, then geo-rep was sending UNLINK to slave instead of RENAME. If rsync job fails if one of the file failed to sync in the job. This patch adds logic to remove GFID from data list if the same changelog has UNLINK entry for it after the DATA. Or it removes those GFIDs during retry of changelogs processing. BUG: 1143853 Change-Id: I982dc976397cd0ab676bb912583f66a28f821926 Signed-off-by: Aravinda VK Reviewed-on: http://review.gluster.org/8761 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Kotresh HR Reviewed-by: Venky Shankar Tested-by: Venky Shankar --- geo-replication/syncdaemon/resource.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'geo-replication/syncdaemon/resource.py') diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 2a887daab15..1bee0a3338f 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -651,8 +651,9 @@ class Server(object): en = e['entry1'] st = lstat(entry) if isinstance(st, int): - (pg, bname) = entry2pb(en) - blob = entry_pack_reg_stat(gfid, bname, e['stat']) + if e['stat']: + (pg, bname) = entry2pb(en) + blob = entry_pack_reg_stat(gfid, bname, e['stat']) else: errno_wrap(os.rename, [entry, en], [ENOENT, EEXIST]) if blob: -- cgit