MB-18171: Break cyclic reference between ActiveStream & ChkptProcesser 60/60060/4
authorabhinavdangeti <abhinav@couchbase.com>
Tue, 16 Feb 2016 18:49:09 +0000 (10:49 -0800)
committerabhinav dangeti <abhinav@couchbase.com>
Wed, 17 Feb 2016 18:07:15 +0000 (18:07 +0000)
commit37d53b1a7339c08dc860003b35bd438e45b3a32f
treea0ace7446f3d689e3a756f9a2980d1801aa72128
parent928ba394413300c6e706b949e394d9d8e782744f
MB-18171: Break cyclic reference between ActiveStream & ChkptProcesser

Removing circular dependency between ActiveStream and
ActiveStreamCheckpointProcesserTask where each holds a reference
to the other causing a memory leak during shutdown.

Also explicitly clear the queues of checkpointProcessor task upon
disconnection of the DcpProducer, so as to remove a cyclic reference
between DcpProducer, ActiveStream, and ActiveStreamCheckpointProcesserTask.

Change-Id: Ifac03a40132431476a6b5000725ce972068b47f4
Reviewed-on: http://review.couchbase.org/60060
Well-Formed: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
src/connmap.cc
src/dcp-producer.cc
src/dcp-producer.h
src/dcp-stream.cc
src/dcp-stream.h
tests/module_tests/stream_test.cc