MB-20330: ReaderLockHolder with no lvalue 82/66282/2
authorJim Walker <jim@couchbase.com>
Thu, 28 Jul 2016 10:32:46 +0000 (11:32 +0100)
committerJim Walker <jim@couchbase.com>
Thu, 28 Jul 2016 18:26:23 +0000 (18:26 +0000)
3.x merge brought in the wrong version of some
code meaning that a read lock is never acquired.

Change-Id: I139ac041d54fdf8d459f4309a9c2be22e40afb8e
Reviewed-on: http://review.couchbase.org/66282
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>

src/ep.cc

index a49602e..b5b8e55 100644 (file)
--- a/src/ep.cc
+++ b/src/ep.cc
@@ -1803,7 +1803,7 @@ void EventuallyPersistentStore::completeBGFetchMulti(uint16_t vbId,
                     if (status == ENGINE_SUCCESS) {
                         v->unlocked_restoreValue(fetchedValue, vb->ht);
                         cb_assert(v->isResident());
-                        ReaderLockHolder(vb->getStateLock());
+                        ReaderLockHolder rlh(vb->getStateLock());
                         if (vb->getState() == vbucket_state_active &&
                             v->getExptime() != fetchedValue->getExptime() &&
                             v->getCas() == fetchedValue->getCas()) {