summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-10-05 23:44:46 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-03-20 13:58:38 +0000
commit9bd5c119076577b1029c7f451d19baa9a735a850 (patch)
tree16584311d0e8233aad585a7eaa08e60fecfe9669 /libglusterfs
parent616c5bf733e64df0f9f6822180d62418688cfc1c (diff)
glusterd : introduce timer in mgmt_v3_lock
Problem: In a multinode environment, if two of the op-sm transactions are initiated on one of the receiver nodes at the same time, there might be a possibility that glusterd may end up in stale lock. Solution: During mgmt_v3_lock a registration is made to gf_timer_call_after which release the lock after certain period of time >Change-Id: I16cc2e5186a2e8a5e35eca2468b031811e093843 >BUG: 1499004 >Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Change-Id: I16cc2e5186a2e8a5e35eca2468b031811e093843 BUG: 1557304 Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.h2
-rw-r--r--libglusterfs/src/mem-types.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 6243732b522..5a86a0df666 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -101,7 +101,7 @@ void trap (void);
#define GF_CLNT_INSECURE_PORT_CEILING (GF_IANA_PRIV_PORTS_START - 1)
#define GF_PORT_MAX 65535
#define GF_PORT_ARRAY_SIZE ((GF_PORT_MAX + 7) / 8)
-
+#define GF_LOCK_TIMER 180
#define GF_MINUTE_IN_SECONDS 60
#define GF_HOUR_IN_SECONDS (60*60)
#define GF_DAY_IN_SECONDS (24*60*60)
diff --git a/libglusterfs/src/mem-types.h b/libglusterfs/src/mem-types.h
index 6c0472f00b8..dc2bbdb1126 100644
--- a/libglusterfs/src/mem-types.h
+++ b/libglusterfs/src/mem-types.h
@@ -172,6 +172,7 @@ enum gf_common_mem_types_ {
gf_common_mt_tbf_bucket_t,
gf_common_mt_tbf_throttle_t,
gf_common_mt_pthread_t,
+ gf_common_mt_mgmt_v3_lock_timer_t,
gf_common_mt_end
};
#endif