Skip to content

Commit 0c62ce0

Browse files
committed
MB-43205: Remove DcpConsumer::engine
The ConnHandler base class has it already, just use that. Change-Id: I2ee8b2973f0cfa1bd6ca295e0deb9348cbde6045 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/143659 Reviewed-by: Trond Norbye <[email protected]> Tested-by: Build Bot <[email protected]> Well-Formed: Build Bot <[email protected]>
1 parent 8d13b01 commit 0c62ce0

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

engines/ep/src/dcp/consumer.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ DcpConsumer::DcpConsumer(EventuallyPersistentEngine& engine,
153153
const std::string& consumerName_)
154154
: ConnHandler(engine, cookie, name),
155155
lastMessageTime(ep_current_time()),
156-
engine(engine),
157156
opaqueCounter(0),
158157
processorTaskId(0),
159158
processorTaskState(all_processed),
@@ -308,7 +307,7 @@ ENGINE_ERROR_CODE DcpConsumer::addStream(uint32_t opaque,
308307
bool exp = false;
309308
if (processorTaskRunning.compare_exchange_strong(exp, true)) {
310309
ExTask task = std::make_shared<DcpConsumerTask>(
311-
&engine, shared_from_this(), 1);
310+
&engine_, shared_from_this(), 1);
312311
processorTaskId = ExecutorPool::get()->schedule(task);
313312
}
314313

engines/ep/src/dcp/consumer.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,6 @@ class DcpConsumer : public ConnHandler,
540540
uint32_t opaque,
541541
std::unique_ptr<DcpResponse> msg);
542542

543-
/* Reference to the ep engine; need to create the 'Processor' task */
544-
EventuallyPersistentEngine& engine;
545543
uint64_t opaqueCounter;
546544
size_t processorTaskId;
547545
std::atomic<enum process_items_error_t> processorTaskState;

0 commit comments

Comments
 (0)