summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/afr/src/afr-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index a4f97e950ae..250b0944e90 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -1833,6 +1833,11 @@ afr_lookup_perform_self_heal (call_frame_t *frame, xlator_t *this,
afr_lookup_set_self_heal_params (local, this);
if (afr_can_self_heal_proceed (&local->self_heal, priv)) {
if (afr_is_transaction_running (local) &&
+ /*Forcefully call afr_launch_self_heal (which will go on to
+ fail) for SB files.This prevents stale data being served
+ due to race in afr_is_transaction_running() when
+ multiple clients access the same SB file*/
+ !local->cont.lookup.possible_spb &&
(!local->attempt_self_heal))
goto out;