summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-07-13 18:45:11 +0530
committerDan Lambright <dlambrig@redhat.com>2015-08-12 06:47:43 -0700
commitb5a98df6343da6229b1b102883d8e992cd4a55a5 (patch)
treeb06d3300386803208d4426cc901ac5bcf0ba52f4 /xlators/cluster
parente8ea08d9a9ca9e507919c121b3a2e56fd5f580f4 (diff)
tier/libgfdb : Setting Freq counters of un-selected files to zero
Change Time Recorder increments the write/read frequency counters on a read or write of a file, if the "features.record-counters" is "on". It is the responsibility of the tiering migrator to reset these counters to zero for un-selected files to reset them to zero as frequency counters are function of promotion/Demotion cycles. If the counters are not set to zero then, 1) the counters may overflow in the DB 2) The file may be wrongly promoted or demoted. This fix will reset the freq counters of un-selected files to zero after promotion/demotion frequency. Change-Id: Ideea2c76a52d421a7e67c37fb0c823f552b3da7a BUG: 1242504 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/11648 Tested-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/dht/src/tier.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 66a08d10801..26c96a89039 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -508,7 +508,7 @@ tier_process_brick_cbk (dict_t *brick_dict, char *key, data_t *value,
write_freq_threshold,
query_cbk_args->defrag->
read_freq_threshold,
- _gf_false);
+ _gf_true);
}
} else {
if (query_cbk_args->defrag->write_freq_threshold == 0 &&
@@ -527,7 +527,7 @@ tier_process_brick_cbk (dict_t *brick_dict, char *key, data_t *value,
query_cbk_args->defrag->
write_freq_threshold,
query_cbk_args->defrag->read_freq_threshold,
- _gf_false);
+ _gf_true);
}
}
if (ret) {