MB-22180: Ensure all pendingBGFetches are terminated on VBbucket delete 11/73811/20
authorDaniel Owen <owend@couchbase.com>
Mon, 19 Dec 2016 04:17:33 +0000 (04:17 +0000)
committerDave Rigby <daver@couchbase.com>
Wed, 1 Mar 2017 09:45:45 +0000 (09:45 +0000)
commit7b2c0f63897225ced96b6198c8c3bcef07a38f6c
tree174a0b2e8ddbf22250c95e1719464d668c34aba8
parent17d8153f04d64c5ecb92e1f2e68bbfa7445e521f
MB-22180: Ensure all pendingBGFetches are terminated on VBbucket delete

On a VBucket delete we need to ensure that all pendingBGFetches are
terminated and any connections waiting for a BGFetch to complete are
notified with ENGINE_NOT_MY_VBUCKET.

Although we previously deleted the pendingBGFetches in the vbucket
destructor we did not send any notifications to waiting connections.

This patch moves the deletion of pendingBGFetches into the
notifyAllPendingConnsFailed function and in addition notifies all the
connections awaiting a BGFetch with an ENGINE_NOT_MY_VBUCKET.

Change-Id: I13a99fe01153a4ba8786aaf608b25ed31ace5a0c
Reviewed-on: http://review.couchbase.org/73811
Well-Formed: Build Bot <build@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
src/ep.cc
src/tasks.cc
src/tasks.h
src/vbucket.cc
tests/module_tests/evp_store_single_threaded_test.cc
tests/module_tests/evp_store_test.cc