Bug 771787 - some unindexed files don't sync over
Summary: some unindexed files don't sync over
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Csaba Henk
QA Contact: Vijaykumar Koppad
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-04 23:52 UTC by Csaba Henk
Modified: 2014-08-25 00:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-01 14:12:34 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: 3.3.0qa45


Attachments (Terms of Use)

Description Csaba Henk 2012-01-04 23:52:25 UTC
Description of problem:

In some scenario some unindexed files (files with no valid xtime) won't be copied by geo-rep from master to slave

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

master
release-3.2

How reproducible:

Reliably

Steps to Reproduce:

1. rm -rf /backing/dir /slave/dir && mkdir /slave/dir
2. gluster volume create my-vol my-ip:/backing-dir && gluster volume start my-vol
3. mount -t glusterfs localhost:my-vol /mnt/gluster
4. mkdir -p /mnt/gluster/a/{b,c}
5. touch /mnt/gluster/a/b/d
6. gluster volume set my-vol indexing on
7. touch /mnt/gluster0/a/c/e
8. gluster volume geo-replication pop /slave/dir start
9. sleep 30 && find /slave/dir -type f

Actual results:

/slave/dir/a/c/e

Expected results:

/slave/dir/a/b/d
/slave/dir/a/c/e

Additional info:

The bug was spotted in code and the above is a PoC demo.

The fallback xtime that is sent over the wire is always -∞ for master side unindexed files (although their on-disk xtime is being properly set to current xtime), cf.

https://github.com/gluster/glusterfs/blob/c66ced7d87/xlators/features/marker/utils/syncdaemon/master.py#L84

Thus if we set up a scenario so that there is no reason for gsyncd to look at the (originally) unindexed file again, it will be omitted from synchronization. (This is a bit tricky because in the most simplistic scenarios the file will be revisited due to its freshly set xtime).

Comment 1 Csaba Henk 2012-01-05 14:18:43 UTC
(In step 7., s/gluster0/gluster/; in step 8., s/pop/my-vol/)

Comment 2 Anand Avati 2012-02-07 17:50:10 UTC
CHANGE: http://review.gluster.com/2580 (geo-rep: gsyncd: fix up fallback xtime for orphans on master side) merged in master by Vijay Bellur (vijay)

Comment 3 Anand Avati 2012-04-12 17:18:01 UTC
CHANGE: http://review.gluster.com/3103 (geo-rep: gsyncd: fix up fallback xtime for orphans on master side) merged in release-3.2 by Vijay Bellur (vijay)


Note You need to log in before you can comment on or make changes to this bug.