diff options
author | Eric Milkie <milkie@10gen.com> | 2014-09-18 17:08:40 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-09-19 11:50:30 -0400 |
commit | 7e121c042020285789730da5e9ec9c70800585a8 (patch) | |
tree | ffe4eca9c6b697c232a448e10e8e83294185d3f3 /src/mongo/db/repl/sync_tail.h | |
parent | d4939de9c4ee3f3fd2d6b3bc55d4414b6d850c66 (diff) | |
download | mongo-7e121c042020285789730da5e9ec9c70800585a8.tar.gz |
SERVER-15089 move the applier threadpools into SyncTail
Diffstat (limited to 'src/mongo/db/repl/sync_tail.h')
-rw-r--r-- | src/mongo/db/repl/sync_tail.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/repl/sync_tail.h b/src/mongo/db/repl/sync_tail.h index 7d090725f56..5df99e4c86e 100644 --- a/src/mongo/db/repl/sync_tail.h +++ b/src/mongo/db/repl/sync_tail.h @@ -32,6 +32,7 @@ #include "mongo/db/storage/mmap_v1/dur.h" #include "mongo/db/repl/sync.h" +#include "mongo/util/concurrency/thread_pool.h" namespace mongo { @@ -47,7 +48,6 @@ namespace repl { class SyncTail : public Sync { typedef void (*MultiSyncApplyFunc)(const std::vector<BSONObj>& ops, SyncTail* st); public: - SyncTail(BackgroundSyncInterface *q); SyncTail(BackgroundSyncInterface *q, MultiSyncApplyFunc func); virtual ~SyncTail(); virtual bool syncApply(OperationContext* txn, @@ -135,6 +135,12 @@ namespace repl { std::vector< std::vector<BSONObj> >* writerVectors); void handleSlaveDelay(const BSONObj& op); void setOplogVersion(const BSONObj& op); + + // persistent pool of worker threads for writing ops to the databases + threadpool::ThreadPool _writerPool; + // persistent pool of worker threads for prefetching + threadpool::ThreadPool _prefetcherPool; + }; // These free functions are used by the thread pool workers to write ops to the db. |