summaryrefslogtreecommitdiffstats
path: root/xlators/features/changetimerecorder/src/ctr-helper.h
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-09-18 19:57:54 +0530
committerDan Lambright <dlambrig@redhat.com>2015-10-08 12:00:31 -0700
commit58d1a9be562630bd1ed8af3e496ca05e087adece (patch)
tree5feb32ff9e6ad3c38d87759589426471a4044671 /xlators/features/changetimerecorder/src/ctr-helper.h
parent81d4aa18b3a1cdad0e0e8df43fe4c8c141c06618 (diff)
downloadglusterfs-58d1a9be562630bd1ed8af3e496ca05e087adece.tar.gz
glusterfs-58d1a9be562630bd1ed8af3e496ca05e087adece.tar.xz
glusterfs-58d1a9be562630bd1ed8af3e496ca05e087adece.zip
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 <josferna@redhat.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12191 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'xlators/features/changetimerecorder/src/ctr-helper.h')
-rw-r--r--xlators/features/changetimerecorder/src/ctr-helper.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h
index cff7975660..dbad302946 100644
--- a/xlators/features/changetimerecorder/src/ctr-helper.h
+++ b/xlators/features/changetimerecorder/src/ctr-helper.h
@@ -30,6 +30,13 @@
#define CTR_DEFAULT_HARDLINK_EXP_PERIOD 300 /* Five mins */
#define CTR_DEFAULT_INODE_EXP_PERIOD 300 /* Five mins */
+
+typedef struct ctr_query_cbk_args {
+ FILE *queryFILE;
+ int count;
+} ctr_query_cbk_args_t;
+
+
/*CTR Xlator Private structure*/
typedef struct gf_ctr_private {
gf_boolean_t enabled;