summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/tier-ctr-interface.h
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2016-10-15 10:49:19 +0530
committerDan Lambright <dlambrig@redhat.com>2016-10-19 12:51:48 -0700
commit460016428cf27484c333227f534c2e2f73a37fb1 (patch)
tree321a1bb0517f622a134b3ab0634d6fea842fdb06 /libglusterfs/src/tier-ctr-interface.h
parent20d2b36f3acc2f27527b7913d2ad939848395aeb (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-emergency-demote-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 Change-Id: If56af78c6c81d37529b9b6e65ae606ba5c99a811 BUG: 1366648 Signed-off-by: Milind Changire <mchangir@redhat.com> 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>
Diffstat (limited to 'libglusterfs/src/tier-ctr-interface.h')
-rw-r--r--libglusterfs/src/tier-ctr-interface.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/libglusterfs/src/tier-ctr-interface.h b/libglusterfs/src/tier-ctr-interface.h
new file mode 100644
index 00000000000..cfd3f8a5e5d
--- /dev/null
+++ b/libglusterfs/src/tier-ctr-interface.h
@@ -0,0 +1,44 @@
+#ifndef _TIER_CTR_INTERFACE_H_
+#define _TIER_CTR_INTERFACE_H_
+
+#include "common-utils.h"
+#include "gfdb_data_store_types.h"
+
+#define GFDB_IPC_CTR_KEY "gfdb.ipc-ctr-op"
+
+/*
+ * CTR IPC OPERATIONS
+ *
+ *
+ */
+#define GFDB_IPC_CTR_QUERY_OPS "gfdb.ipc-ctr-query-op"
+#define GFDB_IPC_CTR_CLEAR_OPS "gfdb.ipc-ctr-clear-op"
+#define GFDB_IPC_CTR_GET_DB_PARAM_OPS "gfdb.ipc-ctr-get-db-parm"
+#define GFDB_IPC_CTR_GET_DB_VERSION_OPS "gfdb.ipc-ctr-get-db-version"
+#define GFDB_IPC_CTR_SET_COMPACT_PRAGMA "gfdb.ipc-ctr-set-compact-pragma"
+/*
+ * CTR IPC INPUT/OUTPUT
+ *
+ *
+ */
+#define GFDB_IPC_CTR_GET_QFILE_PATH "gfdb.ipc-ctr-get-qfile-path"
+#define GFDB_IPC_CTR_GET_QUERY_PARAMS "gfdb.ipc-ctr-get-query-parms"
+#define GFDB_IPC_CTR_RET_QUERY_COUNT "gfdb.ipc-ctr-ret-rec-count"
+#define GFDB_IPC_CTR_GET_DB_KEY "gfdb.ipc-ctr-get-params-key"
+#define GFDB_IPC_CTR_RET_DB_VERSION "gfdb.ipc-ctr-ret-db-version"
+
+/*
+ * gfdb ipc ctr params for query
+ *
+ *
+ */
+typedef struct gfdb_ipc_ctr_params {
+ gf_boolean_t is_promote;
+ int write_freq_threshold;
+ int read_freq_threshold;
+ gfdb_time_t time_stamp;
+ int query_limit;
+ gf_boolean_t emergency_demote;
+} gfdb_ipc_ctr_params_t;
+
+#endif