[BP] MB-16366: Obtain vbstate readlock in numerous operations 65/62965/4
authorJim Walker <jim@couchbase.com>
Fri, 9 Oct 2015 14:14:28 +0000 (15:14 +0100)
committerChiyoung Seo <chiyoung@couchbase.com>
Sat, 23 Apr 2016 01:39:32 +0000 (01:39 +0000)
commitac78070d8dae90427c4bd3030a7be4ab09f920ae
tree2aed8b151a10dd0c07630a166d2de48ff79b3da6
parentda65c6d980cce70f105ed21d7c983fc8480ab103
[BP] MB-16366: Obtain vbstate readlock in numerous operations

Any KV update operations grab the lock early and test that VB state
is active, they keep the lock until complete, this certainly protects
queueDirty from colliding with a VB state change and also any other
paths we're unaware of.

The GET operations only use the read lock if the GET has triggered a
expiry/queueDirty.

A couple of other locations that trigger queueDirty are also interlocked
with VB state changes.

(Already Reviewed-on: http://review.couchbase.org/55868)

Change-Id: Icaee69520da230a9fdde6eb85365a7ddae790fd6
Reviewed-on: http://review.couchbase.org/62965
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/ep.cc
src/ep.h