MB-16915: RollbackTask to hold ref count ptr for DCP consumer instead of raw ptr 27/57427/3
authorManu Dhundi <manu@couchbase.com>
Thu, 3 Dec 2015 01:19:51 +0000 (17:19 -0800)
committerManu Dhundi <manu@couchbase.com>
Thu, 3 Dec 2015 01:36:50 +0000 (01:36 +0000)
commit923a68c6a0a46d349b18cbadb62c37ab639e0a51
treed6b753a7e5dd071cb305df33d942cff0edeed516
parentfa17728e7ca0c637c84a2208b5decfe7ba7e54f1
MB-16915: RollbackTask to hold ref count ptr for DCP consumer instead of raw ptr

Rollback task is spawned when a DCP consumer is asked to rollback by a DCP
producer. Rollback runs in background and there is a possibility that the DCP
consumer object gets deleted before rollback task completes. We can avoid this
if RollbackTask holds a ref counted ptr of DCP consumer instead of a raw ptr.

Change-Id: I00c1bced0ec445226e64e6f7647a3bfbfb063f94
Reviewed-on: http://review.couchbase.org/57427
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/dcp-consumer.cc
src/dcp-consumer.h