Skip to content

Commit aa4683d

Browse files
Rob Lyerlymeta-codesync[bot]
authored andcommitted
Remove unused JobScheduler from BlockCache config
Summary: Not used, no need to pass it in Reviewed By: AlnisM Differential Revision: D87248436 fbshipit-source-id: 6c940696adb229f3268f84f6350a84d35b8b4743
1 parent 888ffd6 commit aa4683d

File tree

4 files changed

+48
-55
lines changed

4 files changed

+48
-55
lines changed

cachelib/navy/Factory.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,8 @@ class BlockCacheProtoImpl final : public BlockCacheProto {
139139
config_.legacyEventTracker = legacyEventTracker;
140140
}
141141

142-
std::unique_ptr<Engine> create(JobScheduler& scheduler,
143-
ExpiredCheck checkExpired,
142+
std::unique_ptr<Engine> create(ExpiredCheck checkExpired,
144143
DestructorCallback cb) && {
145-
config_.scheduler = &scheduler;
146144
config_.checkExpired = std::move(checkExpired);
147145
config_.destructorCb = std::move(cb);
148146
return std::make_unique<BlockCache>(std::move(config_));
@@ -243,7 +241,7 @@ class EnginePairProtoImpl final : public EnginePairProto {
243241
if (bcProto != nullptr) {
244242
bcProto->setDevice(device);
245243
bcProto->setPersistParams(persistParams);
246-
bc = std::move(*bcProto).create(scheduler, checkExpired, destructorCb);
244+
bc = std::move(*bcProto).create(checkExpired, destructorCb);
247245
}
248246
}
249247

cachelib/navy/block_cache/BlockCache.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
namespace facebook::cachelib::navy {
3333

3434
BlockCache::Config& BlockCache::Config::validate() {
35-
XDCHECK_NE(scheduler, nullptr);
3635
if (!device || !evictionPolicy) {
3736
throw std::invalid_argument("missing required param");
3837
}

cachelib/navy/block_cache/BlockCache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ class BlockCache final : public Engine {
5858
uint64_t regionSize{16 * 1024 * 1024};
5959
// See AbstractCacheProto::setReadBufferSize
6060
uint32_t readBufferSize{};
61-
// Job scheduler for background tasks
62-
JobScheduler* scheduler{};
6361
// Clean region pool size
6462
uint32_t cleanRegionsPool{1};
6563
// The number of region_manager threads for reclaim and flush

0 commit comments

Comments
 (0)