summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-08-12 13:29:10 +0530
committerAnand Avati <avati@redhat.com>2012-08-23 21:42:19 -0700
commit16e880a9580dc920dedf36856154cf791e7d040a (patch)
tree0d142bba761b3bc9bf3cb11949eb90b7bd76bec4 /xlators/cluster/afr/src/afr-self-heal-common.c
parent058a736f9e36238c284ca80e7ed5f62434655019 (diff)
afr: Avoid excessive logging in self-heal.
- (Excessive) Logging has been very useful as 'bread-crumbs' in many a root-cause analyses. This patch aims at avoiding logging when the information could be reconstructed using the xattrs, statedump, and/or "volume heal" CLI commands. Change-Id: Iebc6b10ae18f0dd9704bdc6dd03bcfe0f2a09abd BUG: 844804 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3805 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index 48fa31d86..a08190480 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1007,7 +1007,7 @@ afr_sh_missing_entries_done (call_frame_t *frame, xlator_t *this)
afr_sh_reset (frame, this);
if (local->govinda_gOvinda) {
- gf_log (this->name, GF_LOG_INFO,
+ gf_log (this->name, GF_LOG_DEBUG,
"split brain found, aborting selfheal of %s",
local->loc.path);
sh->op_failed = 1;
@@ -1099,7 +1099,7 @@ afr_sh_common_lookup_resp_handler (call_frame_t *frame, void *cookie,
sh->success_count++;
sh->xattr[child_index] = dict_ref (xattr);
} else {
- gf_log (this->name, GF_LOG_ERROR, "path %s on subvolume"
+ gf_log (this->name, GF_LOG_DEBUG, "path %s on subvolume"
" %s => -1 (%s)", loc->path,
priv->children[child_index]->name,
strerror (op_errno));
@@ -2171,11 +2171,17 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this)
afr_self_heal_type_str_get (sh, sh_type_str,
sizeof(sh_type_str));
if (sh->op_failed) {
- gf_log (this->name, GF_LOG_ERROR, "background %s self-heal "
+ gf_loglevel_t loglevel = GF_LOG_ERROR;
+ if (priv->shd.iamshd)
+ loglevel = GF_LOG_DEBUG;
+
+ gf_log (this->name, loglevel, "background %s self-heal "
"failed on %s", sh_type_str, local->loc.path);
+
} else {
- gf_log (this->name, GF_LOG_INFO, "background %s self-heal "
+ gf_log (this->name, GF_LOG_DEBUG, "background %s self-heal "
"completed on %s", sh_type_str, local->loc.path);
+
}
FRAME_SU_UNDO (bgsh_frame, afr_local_t);