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 07:14:10 -0800
commit439de31320315872d988720991e9baaead8712db (patch)
treeaf9003c4b83ad4983c2597c44f5c476664934074 /libglusterfs/src/gfdb/gfdb_data_store.h
parent074158e7081ff0118c719aac7cf1bcde92ee8f7d (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. 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>
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 5d25fa44a4a..1e8c3ebe6ad 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store.h
@@ -278,7 +278,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
@@ -292,10 +292,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.
@@ -308,28 +308,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;
@@ -340,7 +359,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;