diff options
author | Ravishankar N <ravishankar@redhat.com> | 2017-09-14 11:29:15 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2017-09-26 04:04:18 +0000 |
commit | 1719cffa911c5287715abfdb991bc8862f0c994e (patch) | |
tree | 3d524fab0d31fe7b3512fab1e4e6fa08b1f29ff8 /tests/bugs | |
parent | 898f0b7ce31ddf8ec02e572c5d22eff2e4205b4c (diff) |
afr: auto-resolve split-brains for zero-byte files
Problems:
As described in BZ 1491670, renaming hardlinks can result in data/mdata
split-brain of the DHT link-to files (T files) without any mismatch of
data and metadata.
As described in BZ 1486063, for a zero-byte file with only dirty bits
set, arbiter brick will likely be chosen as the source brick.
Fix:
For zero byte files in split-brain, pick first brick as
a) data source if file size is zero on all bricks.
b) metadata source if metadata is the same on all bricks
In arbiter case, if file size is zero on all bricks and there are no
pending afr xattrs, pick 1st brick as data source.
Change-Id: I0270a9a2f97c3b21087e280bb890159b43975e04
BUG: 1491670
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reported-by: Rahul Hinduja <rhinduja@redhat.com>
Reported-by: Mabi <mabi@protonmail.ch>
Diffstat (limited to 'tests/bugs')
-rw-r--r-- | tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t index 81655074c9c..fe8e992e8f8 100644 --- a/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t +++ b/tests/bugs/replicate/bug-1190069-afr-stale-index-entries.t @@ -28,7 +28,7 @@ EXPECT_WITHIN $CHILD_UP_TIMEOUT '1' afr_child_up_status_meta $M0 $V0-replicate-0 TEST kill_brick $V0 $H0 $B0/$V0"0" TEST stat $M0/datafile TEST `echo append>>$M0/datafile` -TEST chmod +x $M0/mdatafile +TEST chmod -x $M0/mdatafile TEST $CLI volume start $V0 force EXPECT_WITHIN $CHILD_UP_TIMEOUT '1' afr_child_up_status_meta $M0 $V0-replicate-0 0 TEST ! cat $M0/datafile |