From 58d1a9be562630bd1ed8af3e496ca05e087adece Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Fri, 18 Sep 2015 19:57:54 +0530 Subject: tier/ctr: Solution for db locks for tier migrator and ctr using sqlite version less than 3.7 i.e rhel 6.7 Problem: On RHEL 6.7, we have sqlite version 3.6.2 which doesnt support WAL journaling mode, as this journaling mode is only available in sqlite 3.7 and above. As a result we cannot have to progreses concurrently accessing sqlite, without running into db locks! Well WAL is also need for performace on CTR side. Solution: This solution is to use CTR db connection for doing queries when WAL mode is absent. i,e tier migrator will send sync_op ipc calls to CTR, which in turn will do the query and create/update the query file suggested by tier migrator. Pending: Well this solution will stop the db locks but the performance is still an issue for CTR. We are developing an in-Memory Transaction Log (iMeTaL) which will help boost the CTR performance by doing in memory udpates on the IO path and later flush the updates to the db in a batch/segment flush. Change-Id: Ie3149643ded159234b5cc6aa6cf93b9022c2f124 BUG: 1240577 Signed-off-by: Joseph Fernandes Signed-off-by: Dan Lambright Signed-off-by: Joseph Fernandes Reviewed-on: http://review.gluster.org/12191 Tested-by: Gluster Build System Reviewed-by: Luis Pabon --- libglusterfs/src/gfdb/gfdb_data_store_types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libglusterfs/src/gfdb/gfdb_data_store_types.h') diff --git a/libglusterfs/src/gfdb/gfdb_data_store_types.h b/libglusterfs/src/gfdb/gfdb_data_store_types.h index 2d3c5ede99c..ab8b7945d2c 100644 --- a/libglusterfs/src/gfdb/gfdb_data_store_types.h +++ b/libglusterfs/src/gfdb/gfdb_data_store_types.h @@ -651,6 +651,13 @@ typedef int typedef int (*gfdb_clear_files_heat_t)(void *db_conn); +typedef int (*gfdb_get_db_version_t)(void *db_conn, + char **version); + +typedef int (*gfdb_get_db_setting_t)(void *db_conn, + char *param_key, + char **param_value); + /*Data structure holding all the above plugin function pointers*/ typedef struct gfdb_db_operations { @@ -666,6 +673,8 @@ typedef struct gfdb_db_operations { gfdb_find_recently_changed_files_freq_t find_recently_changed_files_freq_op; gfdb_clear_files_heat_t clear_files_heat_op; + gfdb_get_db_version_t get_db_version; + gfdb_get_db_setting_t get_db_setting; } gfdb_db_operations_t; /******************************************************************************* @@ -709,6 +718,7 @@ typedef struct gfdb_connection { gf_msg (comp_name, GF_LOG_ERROR, 0,\ LG_MSG_SET_PARAM_FAILED, "Failed setting %s "\ "to params dictionary", param_key);\ + data_destroy (data);\ goto error;\ };\ } while (0) -- cgit