Bug 1437960

Summary: [Parallel-readdirp] Rename of files results in duplicate files in mount point as we enable parallel readdirp for the gluster volume
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Vivek Das <vdas>
Component: glusterfsAssignee: Poornima G <pgurusid>
Status: CLOSED ERRATA QA Contact: Vivek Das <vdas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, pgurusid, rgowdapp, rhinduja, rhs-bugs, rtalur, vbellur
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: dht-parallel-readdirp
Fixed In Version: glusterfs-3.8.4-28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:35:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1435942    
Bug Blocks: 1417151    

Description Vivek Das 2017-03-31 14:29:45 UTC
Description of problem:
Rename creates duplicate files when parallel readdirp is enabled for the volume.

Version-Release number of selected component (if applicable):
glusterfs-3.8.4-20.el7rhgs.x86_64
samba-client-4.6.2-0.el7rhgs.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Update the gluster cluster with CTDB to 3.3.0 builds
2.Enable parralel-readdirp for the volume
3.Mount the volume in windows client
4.Create a file
5.Rename the same file
6.Refresh the explorer

Actual results:
The mount shows both the files

Expected results:
Should just rename the file without creating additional file

Additional info:

Comment 2 Poornima G 2017-04-06 05:03:40 UTC
Fix @ https://code.engineering.redhat.com/gerrit/#/c/102614/

Comment 7 Vivek Das 2017-04-26 11:05:06 UTC
So i did disable nl.cache and kept parallel-readdir enable and was able to reproduce the issue discussed in comment 6.

Comment 9 Poornima G 2017-05-16 06:30:40 UTC
It is backported to downstream, and is merged: https://code.engineering.redhat.com/gerrit/#/c/103635/

Comment 10 Atin Mukherjee 2017-06-13 04:56:33 UTC
upstream patch : https://review.gluster.org/17504

Comment 11 Atin Mukherjee 2017-06-13 10:21:24 UTC
downstream patch : https://code.engineering.redhat.com/gerrit/#/c/108887/

Comment 13 Vivek Das 2017-07-07 06:19:19 UTC
With the latest gluster version the above issue is not seen.
when i created 5000, 10,000, 50,000 & 1 Lakh zero kb files in separately in windows mount and then when i rename a file in each case, i don't see any duplicate file getting created.

Version
---------
samba-4.6.3-3.el7rhgs.x86_64
glusterfs-3.8.4-32.el7rhgs.x86_64

Comment 15 errata-xmlrpc 2017-09-21 04:35:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2774