Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1272986

Summary: [sharding+geo-rep]: On existing slave mount, reading files fails to show sharded file content
Product: [Community] GlusterFS Reporter: Rahul Hinduja <rhinduja>
Component: shardingAssignee: Krutika Dhananjay <kdhananj>
Status: CLOSED CURRENTRELEASE QA Contact: bugs <bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, kdhananj, sabose
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.8rc2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1274600 (view as bug list) Environment:
Last Closed: 2016-06-16 13:40:47 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:    
Bug Blocks: 1274600    

Description Rahul Hinduja 2015-10-19 11:21:00 UTC
Description of problem:
=======================

In geo-rep setup, when a data on file increases beyond 4M size the files gets synced to slave but reading file from slave mount only shows the original file content and not the content of sharded chunk. 

Unmounting and remounting the slave volume shows the proper content including sharded file contents. 

Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.8dev-0.929.gitbece485.el7rhgs.x86_64


How reproducible:
=================

Always


Steps to Reproduce:
===================
1. Create Master and Slave Cluster
2. Create Master and Slave Volume with meta_volume to true and features.shard on. Also enable performance.strict-write-ordering on the master volume
3. Create and Start geo-rep session
4. Mount master and slave volume
5. Create a file with total size less than 4M {I created file_1.9M with 1.9M of size}
6. File should sync to slave. Calculate arequal between master and slave, it should match. Do a diff of file between master and slave, should not show any output.
7. Append the existing file with data to grow total size more than 4M {I appended data of 3.4M to file_1.9M, total size thus becomes 5.2M}
8. Confirm 1 sharded file is created
9. Size at master and slave for file_1.9M is correctly shown as 5.2M but the arequal missmatches. diff shows data is not synced from master to slave. Their is a miss match in sharded files.
10. Umount the slave volume
11. Mount the slave volume again. The arequal matches

Actual results:
===============

On existing slave mount, the file content may be read from some cache


Expected results:
=================

On existing volume, the file should be read as whole including the shareded file content.

Comment 1 Vijay Bellur 2015-10-20 09:31:36 UTC
REVIEW: http://review.gluster.org/12400 (features/shard: Refresh cached size when lookup/readdirp detect that xattr value has changed) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

Comment 2 Vijay Bellur 2015-10-20 11:46:40 UTC
REVIEW: http://review.gluster.org/12400 (features/shard: Force cache-refresh when lookup/readdirp/stat detect that xattr value has changed) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 3 Vijay Bellur 2015-10-27 11:51:46 UTC
REVIEW: http://review.gluster.org/12400 (features/shard: Force cache-refresh when lookup/readdirp/stat detect that xattr value has changed) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 4 Vijay Bellur 2015-10-28 07:04:25 UTC
REVIEW: http://review.gluster.org/12400 (features/shard: Force cache-refresh when lookup/readdirp/stat detect that xattr value has changed) posted (#4) for review on master by Krutika Dhananjay (kdhananj)

Comment 5 Vijay Bellur 2015-10-28 13:38:50 UTC
COMMIT: http://review.gluster.org/12400 committed in master by Jeff Darcy (jdarcy) 
------
commit 8e5a7632edd040031e4942134331172805bc8eff
Author: Krutika Dhananjay <kdhananj>
Date:   Tue Oct 20 11:46:10 2015 +0530

    features/shard: Force cache-refresh when lookup/readdirp/stat detect that xattr value has changed
    
    Change-Id: Ia3225a523287f6689b966ba4f893fc1b1fa54817
    BUG: 1272986
    Signed-off-by: Krutika Dhananjay <kdhananj>
    Reviewed-on: http://review.gluster.org/12400
    Reviewed-by: Pranith Kumar Karampuri <pkarampu>
    Tested-by: Gluster Build System <jenkins.com>

Comment 6 Niels de Vos 2016-06-16 13:40:47 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user