MB-21568: Lock inversion issue in rollback 29/70029/3
authorJim Walker <jim@couchbase.com>
Thu, 17 Nov 2016 15:45:42 +0000 (15:45 +0000)
committerDave Rigby <daver@couchbase.com>
Fri, 18 Nov 2016 08:09:36 +0000 (08:09 +0000)
commitfd43a40de93246dca7cf5de7be197e386729b363
tree9a86c3d4e655b48f4f5de9d535be552b4f22c9c3
parent5731cac9ee06633b0c33a57ae726268081519945
MB-21568: Lock inversion issue in rollback

vbsetMutex must be obtained before vb::stateMutex.

the rollback path needs to keep both held until
complete so some refactoring to expose
_UNLOCKED variants of setVBucketState and resetVbucket
so there's no subsequent inversion risk

Change-Id: I16d869277ad5609b6b45042ea32b3f1037faeb72
Reviewed-on: http://review.couchbase.org/70029
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/ep.cc
src/ep.h