diff options
author | Anuradha <atalur@redhat.com> | 2014-11-13 10:59:52 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2014-11-13 11:55:41 -0800 |
commit | c11c9deb3cf77101c7e440522ab8f5961f815222 (patch) | |
tree | f30ae75a9763243f9aa6baf2a6b2eee4ad5749b6 /xlators/cluster/afr/src/afr-common.c | |
parent | 909eb5671db37ff1388613929fe22883a4677da0 (diff) |
cluster/afr : Prevent excessive logging of split-brain messages.
Running the volume heal info command would result in
excessive logging of split-brain messages. After this patch,
running heal info command will not log the split brain messages.
This info is now displayed in the output of heal info command
instead.
If a file is in split-brain, a message "Is in split-brain"
will be written against its name.
Change-Id: Ib8979be04f5ac7c59ce3ad1185886bb54b8be808
BUG: 1161102
Signed-off-by: Anuradha <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/9069
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index fae3d4c1731..59b8038dcac 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -1923,6 +1923,12 @@ afr_self_heal_lookup_unwind (call_frame_t *frame, xlator_t *this, if (!xattr) goto out; + if (afr_is_split_brain (this, local->cont.lookup.inode)) { + ret = dict_set_int32 (xattr, "split-brain", 1); + if (ret) + gf_log (this->name, GF_LOG_ERROR, "%s: Failed to set " + "split-brain to true", local->loc.path); + } if (sh_failed) { ret = dict_set_int32 (xattr, "sh-failed", sh_failed); if (ret) |