summaryrefslogtreecommitdiffstats
path: root/geo-replication/syncdaemon/syncdutils.py
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2018-07-12 04:31:01 -0400
committerKotresh HR <khiremat@redhat.com>2018-08-16 00:21:01 -0400
commitec5c04fdc552b93c89551549d45e4cac2f1827a2 (patch)
treea3d894be05bdc5db6b9b839dac4893c648b3e8af /geo-replication/syncdaemon/syncdutils.py
parent050969fb3cfb176fa206d3ae8169d6021879d9db (diff)
downloadglusterfs-ec5c04fdc552b93c89551549d45e4cac2f1827a2.tar.gz
glusterfs-ec5c04fdc552b93c89551549d45e4cac2f1827a2.tar.xz
glusterfs-ec5c04fdc552b93c89551549d45e4cac2f1827a2.zip
geo-rep: Fix symlink rename syncing issue
Problem: Geo-rep sometimes fails to sync the rename of symlink if the I/O is as follows 1. touch file1 2. ln -s "./file1" sym_400 3. mv sym_400 renamed_sym_400 4. mkdir sym_400 The file 'renamed_sym_400' failed to sync to slave Cause: Assume there are three distribute subvolume (brick1, brick2, brick3). The changelogs are recorded as follows for above I/O pattern. Note that the MKDIR is recorded on all bricks. 1. brick1: ------- CREATE file1 SYMLINK sym_400 RENAME sym_400 renamed_sym_400 MKDIR sym_400 2. brick2: ------- MKDIR sym_400 3. brick3: ------- MKDIR sym_400 The operations on 'brick1' should be processed sequentially. But since MKDIR is recorded on all the bricks, The brick 'brick2/brick3' processed MKDIR first before 'brick1' causing out of order syncing and created directory sym_400 first. Now 'brick1' processed it's changelog. CREATE file1 -> succeeds SYMLINK sym_400 -> No longer present in master. Ignored RENAME sym_400 renamed_sym_400 While processing RENAME, if source('sym_400') doesn't present, destination('renamed_sym_400') is created. But geo-rep stats the name 'sym_400' to confirm source file's presence. In this race, since source name 'sym_400' is present as directory, it doesn't create destination. Hence RENAME is ignored. Fix: The fix is not rely only on stat of source name during RENAME. It should stat the name and if the name is present, gfid should be same. Only then it can conclude the presence of source. Backport of: > BUG: 1600405 > Change-Id: I9fbec4f13ca6a182798a7f81b356fe2003aff969 > Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1611113 Change-Id: I9fbec4f13ca6a182798a7f81b356fe2003aff969 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/syncdutils.py')
0 files changed, 0 insertions, 0 deletions