From 6b98735956c599ea621fa560b201fb7de6c36cac Mon Sep 17 00:00:00 2001 From: Ashish Pandey Date: Fri, 21 Dec 2018 14:31:15 +0530 Subject: cluster/thin-arbiter: Consider thin-arbiter before marking new entry changelog If a fop to create an entry fails on one of the data brick, we mark the pending changelog on the entry on brick for which it was successful. This is done as part of post op phase to make sure that entry gets healed even if it gets renamed to some other path where its parent was not marked as bad. As it happens as part of post op, we should consider thin-arbiter to check if the brick, which was successful, is the good brick or not. This will avoide split brain and other issues. Change-Id: I12686675be98f02f70a5186b3ed748c541514d53 updates: bz#1662264 Signed-off-by: Ashish Pandey --- xlators/cluster/afr/src/afr-dir-write.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/cluster/afr/src/afr-dir-write.c') diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index f2c8ef450e1..84e2a344624 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -367,6 +367,12 @@ afr_mark_entry_pending_changelog(call_frame_t *frame, xlator_t *this) if (pre_op_count == priv->child_count && !failed_count) return; + if (priv->thin_arbiter_count) { + /*Mark new entry using ta file*/ + local->is_new_entry = _gf_true; + return; + } + afr_mark_new_entry_changelog(frame, this); return; -- cgit