diff options
| author | Joseph Fernandes <josferna@redhat.com> | 2015-08-27 17:23:07 +0530 |
|---|---|---|
| committer | Dan Lambright <dlambrig@redhat.com> | 2015-09-08 05:13:00 -0700 |
| commit | 96af474045c9ba5ab74ca76daa823d91a0a0c610 (patch) | |
| tree | b9f8991807f1d5a41eee82ff69788161af815e72 /libglusterfs/src/gfdb/gfdb_data_store.h | |
| parent | 9efce73fb31d520706a6d47de4daa4fb3366e6a6 (diff) | |
tier/ctr: Solving DB Lock issue due to write contention from db connections
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>
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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.h b/libglusterfs/src/gfdb/gfdb_data_store.h index 57f3de18f1c..5e46162b1ea 100644 --- a/libglusterfs/src/gfdb/gfdb_data_store.h +++ b/libglusterfs/src/gfdb/gfdb_data_store.h @@ -236,6 +236,19 @@ typedef int (*find_recently_changed_files_freq_t) (gfdb_conn_node_t *_conn_node, int read_freq_thresold, gf_boolean_t _clear_counters); + + +/*Libgfdb API Function: Clear the heat for all the files + * + * Arguments: + * _conn_node : GFDB Connection node + * + * Returns : if successful return 0 or + * -ve value in case of failure + **/ +int +clear_files_heat (gfdb_conn_node_t *_conn_node); + typedef struct gfdb_methods_s { init_db_t init_db; fini_db_t fini_db; @@ -250,4 +263,5 @@ void get_gfdb_methods (gfdb_methods_t *methods); typedef void (*get_gfdb_methods_t) (gfdb_methods_t *methods); + #endif |
