diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-07-23 18:08:34 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-07-27 01:58:27 -0700 |
commit | 9108a9edf3743d757996b80593f71452d51a9906 (patch) | |
tree | bdb8f26a756b339a8a079e3c4757131b3a87a05d /xlators/cluster/afr | |
parent | 93d8634dec1bef5fd80f8ee28a4e4e0b8115afdd (diff) |
cluster/afr: Fix incorrect logging in read transactions
Backport of: http://review.gluster.org/11756
afr_read_txn_refresh_done() at its entry point can fail for
reasons like ENOENT/ESTALE but seldom due to EIO, which is something
_AFR_ would internally generate and not receive in response from
a child translator. AFR is reporting "split-brain" for _any_
kind of failure in read txn, of the following kind:
[2015-07-07 18:04:34.787612] E [MSGID: 108008]
[afr-read-txn.c:76:afr_read_txn_refresh_done] 0-vol3-replicate-3:
Failing STAT on gfid 18a973c4-73d3-48b8-942c-33a6f1a8e6b4:
split-brain observed. [Input/output error]
This patch fixes such misleading errors.
To-Do:
Avoid logging EIO if/when split-brain choice is set.
Will do that as part of a separate commit.
Change-Id: Ie2d369eff01a1d262bbfcb6f3f9229860f5a2fcf
BUG: 1246987
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/11764
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r-- | xlators/cluster/afr/src/afr-read-txn.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-read-txn.c b/xlators/cluster/afr/src/afr-read-txn.c index a998ccedbed..1b2faf31eea 100644 --- a/xlators/cluster/afr/src/afr-read-txn.c +++ b/xlators/cluster/afr/src/afr-read-txn.c @@ -72,8 +72,12 @@ afr_read_txn_refresh_done (call_frame_t *frame, xlator_t *this, int err) local = frame->local; inode = local->inode; - if (err) - AFR_READ_TXN_SET_ERROR_AND_GOTO (-1, -err, -1, readfn); + if (err) { + local->op_errno = -err; + local->op_ret = -1; + read_subvol = -1; + goto readfn; + } ret = afr_inode_get_readable (frame, inode, this, local->readable, &event_generation, |