Skip to content

Commit

Permalink
MB-43205: Remove DcpConsumer::engine
Browse files Browse the repository at this point in the history
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 <trond.norbye@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Well-Formed: Build Bot <build@couchbase.com>
  • Loading branch information
paolococchi committed Jan 20, 2021
1 parent 8d13b01 commit 0c62ce0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions engines/ep/src/dcp/consumer.cc
Expand Up @@ -153,7 +153,6 @@ DcpConsumer::DcpConsumer(EventuallyPersistentEngine& engine,
const std::string& consumerName_)
: ConnHandler(engine, cookie, name),
lastMessageTime(ep_current_time()),
engine(engine),
opaqueCounter(0),
processorTaskId(0),
processorTaskState(all_processed),
Expand Down Expand Up @@ -308,7 +307,7 @@ ENGINE_ERROR_CODE DcpConsumer::addStream(uint32_t opaque,
bool exp = false;
if (processorTaskRunning.compare_exchange_strong(exp, true)) {
ExTask task = std::make_shared<DcpConsumerTask>(
&engine, shared_from_this(), 1);
&engine_, shared_from_this(), 1);
processorTaskId = ExecutorPool::get()->schedule(task);
}

Expand Down
2 changes: 0 additions & 2 deletions engines/ep/src/dcp/consumer.h
Expand Up @@ -540,8 +540,6 @@ class DcpConsumer : public ConnHandler,
uint32_t opaque,
std::unique_ptr<DcpResponse> msg);

/* Reference to the ep engine; need to create the 'Processor' task */
EventuallyPersistentEngine& engine;
uint64_t opaqueCounter;
size_t processorTaskId;
std::atomic<enum process_items_error_t> processorTaskState;
Expand Down

0 comments on commit 0c62ce0

Please sign in to comment.