summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/gfdb/gfdb_data_store.h
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-12-15 18:29:06 +0530
committerDan Lambright <dlambrig@redhat.com>2015-12-22 14:45:20 -0800
commita7de0cd095f799e3128f74fcccc57ac4d6fd0b6d (patch)
tree88c29606bcffa1252ac34f6f7a5ff52be1001c5b /libglusterfs/src/gfdb/gfdb_data_store.h
parent7223062cdc1934a6694265cfd73b9cc5a8c4f377 (diff)
ctr/sql: Providing for vol set for sqlcachesize and sqlWALsize and skip recording path
1. Providing vol set option for cache size and wal autocheck point so that performance can be tuned. 2. Removed recording of file path in the db. Trimming database columns. Path need not be stored in the db, as PARGFID, GFID, Basename is suffice to derive the path during migration. Backport of http://review.gluster.org/12972 > Change-Id: I2cb590451a6d244bc91fe66c6dbffe2c2059dfb8 > BUG: 1293034 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12972 > Reviewed-by: N Balachandran <nbalacha@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> > Tested-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: Ia1c109983ec6ce75ed27b8c08f454f5b6283c31d BUG: 1293659 Reviewed-on: http://review.gluster.org/13067 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'libglusterfs/src/gfdb/gfdb_data_store.h')
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.h b/libglusterfs/src/gfdb/gfdb_data_store.h
index 44fdef09b25..6a51e01a704 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store.h
@@ -285,7 +285,7 @@ char *(*get_db_path_key_t)();
/*Libgfdb API Function: Clear the heat for all the files
*
* Arguments:
- * _conn_node : GFDB Connection node
+ * _conn_node : GFDB Connection node
*
* Returns : if successful return 0 or
* -ve value in case of failure
@@ -299,10 +299,10 @@ typedef int (*clear_files_heat_t) (gfdb_conn_node_t *_conn_node);
/* Libgfdb API Function: Function to extract version of the db
* Arguments:
- * gfdb_conn_node_t *_conn_node : GFDB Connection node
- * char **version : the version is extracted as a string and will be stored in
- * this variable. The freeing of the memory should be done by
- * the caller.
+ * gfdb_conn_node_t *_conn_node : GFDB Connection node
+ * char **version : the version is extracted as a string
+ * and will be stored in this variable.
+ * The freeing of the memory should be done by the caller.
* Return:
* On success return the length of the version string that is
* extracted.
@@ -315,28 +315,47 @@ typedef int (*get_db_version_t)(gfdb_conn_node_t *_conn_node,
char **version);
-/* Libgfdb API Function: Function to extract setting from the db
+/* Libgfdb API Function: Function to extract param from the db
* Arguments:
- * gfdb_conn_node_t *_conn_node : GFDB Connection node
- * char *param_key : setting to be extracted
- * char **param_value : the value of the setting that is
+ * gfdb_conn_node_t *_conn_node : GFDB Connection node
+ * char *param_key : param to be extracted
+ * char **param_value : the value of the param that is
* extracted. This function will allocate memory
* to pragma_value. The caller should free the memory.
* Return:
- * On success return the lenght of the pragma/setting value that is
+ * On success return the lenght of the param value that is
* extracted.
* On failure return -1
* */
int
-get_db_setting (gfdb_conn_node_t *_conn_node,
+get_db_params (gfdb_conn_node_t *_conn_node,
char *param_key,
char **param_value);
-typedef int (*get_db_setting_t)(gfdb_conn_node_t *db_conn,
+typedef int (*get_db_params_t)(gfdb_conn_node_t *db_conn,
char *param_key,
char **param_value);
+/* Libgfdb API Function: Function to set db params
+ * Arguments:
+ * gfdb_conn_node_t *_conn_node : GFDB Connection node
+ * char *param_key : param to be set
+ * char *param_value : param value
+ * Return:
+ * On success return 0
+ * On failure return -1
+ * */
+int
+set_db_params (gfdb_conn_node_t *_conn_node,
+ char *param_key,
+ char *param_value);
+
+typedef int (*set_db_params_t)(gfdb_conn_node_t *db_conn,
+ char *param_key,
+ char *param_value);
+
+
typedef struct gfdb_methods_s {
init_db_t init_db;
@@ -347,7 +366,8 @@ typedef struct gfdb_methods_s {
find_recently_changed_files_freq_t find_recently_changed_files_freq;
clear_files_heat_t clear_files_heat;
get_db_version_t get_db_version;
- get_db_setting_t get_db_setting;
+ get_db_params_t get_db_params;
+ set_db_params_t set_db_params;
/* Do not expose dbpath directly. Expose it via an */
/* access function: get_db_path_key(). */
char *dbpath;