summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/tier.h
diff options
context:
space:
mode:
authorJoseph Fernandes <josferna@redhat.com>2015-09-11 09:36:06 -0400
committerDan Lambright <dlambrig@redhat.com>2015-09-11 13:46:50 -0700
commit1d02d4bd9b5f7d730ab08961c17ef58204c8e8fd (patch)
treeb37cf8fffe901013185e8011ea32b680640871d1 /xlators/cluster/dht/src/tier.h
parent46674c5d5caaa183f8ee99efb64ef268eded91ab (diff)
tier/ctr: Solving DB Lock issue due to write contention from db connections
This is a backport of 12031. > Problem: The DB on the brick is been accessed by CTR, for write and > tier migrator, for read and write. The write from tier migrator is reseting > the heat counters after a cycle. Since we are using sqlite, two connections > trying to write would cause a db lock contention. As a result CTR used to fail > to update the db. > Solution: Using the same db connection of CTR for reseting the heat counters. > 1) Introducted a new IPC FOP for CTR > 2) After the query do a ipc syncop to the underlying client xlator associated > to the brick. > 3) CTR in brick will catch the IPC FOP and cleat the heat counters. > Change-Id: I53306bfc08dcdba479deb4ccc154896521336150 > BUG: 1260730 > Signed-off-by: Joseph Fernandes <josferna@redhat.com> > Reviewed-on: http://review.gluster.org/12031 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Conflicts: xlators/cluster/dht/src/tier.c Change-Id: I88aa289cdf21e216b42c3d8ccfb4e7e828b43772 BUG: 1262341 Reviewed-on: http://review.gluster.org/12161 Reviewed-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/tier.h')
-rw-r--r--xlators/cluster/dht/src/tier.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h
index 34631b0a841..d5fbba655e5 100644
--- a/xlators/cluster/dht/src/tier.h
+++ b/xlators/cluster/dht/src/tier.h
@@ -61,10 +61,16 @@ typedef struct _gfdb_brick_dict_info {
query_cbk_args_t *_query_cbk_args;
} _gfdb_brick_dict_info_t;
+typedef struct brick_list {
+ xlator_t *xlator;
+ char *brick_db_path;
+ struct list_head list;
+} brick_list_t;
+
typedef struct _dm_thread_args {
xlator_t *this;
gf_defrag_info_t *defrag;
- dict_t *brick_list;
+ struct list_head *brick_list;
int freq_time;
int return_value;
} promotion_args_t, demotion_args_t;