diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2014-12-12 07:21:19 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-12-22 20:14:14 -0800 |
commit | da9deb54df91dedc51ebe165f3a0be646455cb5b (patch) | |
tree | c3fdd61e31881807dc7dcbfd7ec09145fe0248b0 /xlators/mgmt/glusterd/src/glusterd-sm.h | |
parent | 0e78a12381e988a06e1d5a2dd592d132e24a4e10 (diff) |
glusterd: Maintain per transaction xaction_peers list in syncop & mgmt_v3
In current implementation xaction_peers list is maintained in a global variable
(glustrd_priv_t) for syncop/mgmt_v3. This means consistency and atomicity of
peerinfo list across transactions is not guranteed when multiple syncop/mgmt_v3
transaction are going through.
We had got into a problem in mgmt_v3-locks.t which was failing spuriously, the
reason for that was two volume set operations (in two different volume) was
going through simultaneouly and both of these transaction were manipulating the
same xaction_peers structure which lead to a corrupted list. Because of which in
some cases unlock request to peer was never triggered and we end up with having
stale locks.
Solution is to maintain a per transaction local xaction_peers list for every
syncop.
Please note I've identified this problem in op-sm area as well and a separate
patch will be attempted to fix it.
Finally thanks to Krishnan Parthasarathi and Kaushal M for your constant help to
get to the root cause.
Change-Id: Ib1eaac9e5c8fc319f4e7f8d2ad965bc1357a7c63
BUG: 1173414
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9269
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-sm.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-sm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.h b/xlators/mgmt/glusterd/src/glusterd-sm.h index 294dbacc9d0..fb873f75601 100644 --- a/xlators/mgmt/glusterd/src/glusterd-sm.h +++ b/xlators/mgmt/glusterd/src/glusterd-sm.h @@ -103,6 +103,11 @@ struct glusterd_peerinfo_ { typedef struct glusterd_peerinfo_ glusterd_peerinfo_t; +typedef struct glusterd_local_peers_ { + glusterd_peerinfo_t *peerinfo; + struct list_head op_peers_list; +} glusterd_local_peers_t; + typedef enum glusterd_ev_gen_mode_ { GD_MODE_OFF, GD_MODE_ON, |