summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2016-11-13 10:52:03 +0530
committerDan Lambright <dlambrig@redhat.com>2016-11-28 08:51:36 -0800
commit1001a4f7705f991f3ae1611997cf01b341ac453a (patch)
treeb234f99220eebf640cd864f73ae4f2b848cac12e /xlators/features
parent1b003694f24d82a946e0584213ccf399ba923d58 (diff)
cluster/tier: handle fast demotions
Demote files on priority if hi-watermark has been breached and continue to demote until the watermark drops below hi-watermark. Monitor watermark more frequently. Trigger demotion as soon as hi-watermark is breached. Add cluster.tier-query-limit option to limit number of files returned from the database query for every iteration of tier_migrate_using_query_file(). If watermark hasn't dropped below hi-watermark during the first iteration, the next iteration will be triggered approximately 1 second after tier_demote() returns to the main tiering loop. Update changetimerecorder xlator to handle query for emergency demote mode. Add tier-ctr-interface.h: Move tier and ctr interface specific macros and struct definition from libglusterfs/src/gfdb/gfdb_data_store.h to new header libglusterfs/src/tier-ctr-interface.h > Reviewed-on: http://review.gluster.org/15158 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit 460016428cf27484c333227f534c2e2f73a37fb1) Change-Id: If56af78c6c81d37529b9b6e65ae606ba5c99a811 BUG: 1394482 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/15835 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/changetimerecorder/src/changetimerecorder.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 5f3a074acd5..242658e861c 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -15,6 +15,9 @@
#include "ctr-messages.h"
#include "syscall.h"
+#include "changetimerecorder.h"
+#include "tier-ctr-interface.h"
+
/*******************************inode forget***********************************/
int
@@ -1724,14 +1727,21 @@ ctr_db_query (xlator_t *this,
goto out;
}
if (!ipc_ctr_params->is_promote) {
- if (ipc_ctr_params->write_freq_threshold == 0 &&
- ipc_ctr_params->read_freq_threshold == 0) {
+ if (ipc_ctr_params->emergency_demote) {
+ /* emergency demotion mode */
+ ret = find_all (conn_node,
+ ctr_db_query_callback,
+ (void *)&query_cbk_args,
+ ipc_ctr_params->query_limit);
+ } else {
+ if (ipc_ctr_params->write_freq_threshold == 0 &&
+ ipc_ctr_params->read_freq_threshold == 0) {
ret = find_unchanged_for_time (
conn_node,
ctr_db_query_callback,
(void *)&query_cbk_args,
&ipc_ctr_params->time_stamp);
- } else {
+ } else {
ret = find_unchanged_for_time_freq (
conn_node,
ctr_db_query_callback,
@@ -1740,6 +1750,7 @@ ctr_db_query (xlator_t *this,
ipc_ctr_params->write_freq_threshold,
ipc_ctr_params->read_freq_threshold,
_gf_false);
+ }
}
} else {
if (ipc_ctr_params->write_freq_threshold == 0 &&