Skip to content

Commit 87dc6c8

Browse files
pbhandar2meta-codesync[bot]
authored andcommitted
Propagate poolId and expiryTime through the Navy insert chain
Summary: During NVM eviction, poolId is needed for the user's item destructor callback (DestructorData requires it), and expiryTime is needed for eviction stats (tracking expired evictions) and the checkExpired callback during region reclaim (skipping reinsertion of expired items). Currently both are obtained by reading the full item value from disk and extracting them from the NvmItem. Here are the exact code locations where poolId is used during NVM eviction: - evictCB receives the full item value — NvmCache.h:882-884 ``` void NvmCache<C>::evictCB(HashedKey hk, navy::BufferView value, // <-- full item read from disk navy::DestructorEvent event) { ``` - The value is cast to extract NvmItem — NvmCache.h:889 ``` const auto& nvmItem = *reinterpret_cast<const NvmItem*>(value.data()); ``` - poolId is passed to the item destructor callback — NvmCache.h:1014-1015 ``` itemDestructor_(DestructorData{context, item, std::move(chained), nvmItem.poolId()}); // <-- poolId extracted from NvmItem ``` - Eviction stats, tracking expired items -- fbcode/cachelib/allocator/nvmcache/NvmCache.h:897-903 ``` const auto expiryTime = nvmItem.getExpiryTime(); if (expiryTime != 0) { if (expiryTime < timeNow) { stats().numNvmExpiredEvict.inc(); stats().nvmEvictionSecondsPastExpiry_.trackValue(timeNow - expiryTime); } else { stats().nvmEvictionSecondsToExpiry_.trackValue(expiryTime - timeNow); } } ``` - checkExpired callback defined in NvmCache constructor used during reclaim -- fbcode/cachelib/allocator/nvmcache/NvmCache.h:1046-1049 ``` checkExpired_([](navy::BufferView v) -> bool { const auto& nvmItem = *reinterpret_cast<const NvmItem*>(v.data()); return nvmItem.isExpired(); }), ``` The key thing: nvmItem.poolId() requires having the full value bytes read from disk. So poolId needs to be stored in ItemMetadata and available without a device read. Also NVM item has to be recreated to access the expiry time right now. So expiryTime also needs to be part of ItemMetadata. In follow-up diffs, poolId and expiryTime will be stored in the per-item ItemMetadata struct at the tail of each BlockCache region. During eviction, they will be read from the lightweight metadata footer instead of performing a full device read. This diff is the prerequisite plumbing: it threads both values from the DRAM allocator (NvmCache::put) through the entire Navy insert chain (Driver -> EnginePair -> BlockCache/BigHash) so they are available where metadata is written to disk. Reviewed By: rlyerly Differential Revision: D94323531 fbshipit-source-id: 4e2325fa38fbc33c66868b65f9c69d73b5d5f81e
1 parent 659f2f0 commit 87dc6c8

16 files changed

Lines changed: 468 additions & 212 deletions

File tree

cachelib/allocator/nvmcache/NvmCache.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class NvmCache {
410410
// returns true if there is tombstone entry for the key.
411411
bool hasTombStone(HashedKey hk);
412412

413-
std::unique_ptr<NvmItem> makeNvmItem(const Item& item);
413+
std::unique_ptr<NvmItem> makeNvmItem(const Item& item, uint8_t poolId);
414414

415415
// wrap an item into a blob for writing into navy.
416416
Blob makeBlob(const Item& it);
@@ -1149,9 +1149,8 @@ uint32_t NvmCache<C>::getStorageSizeInNvm(const Item& it) {
11491149
}
11501150

11511151
template <typename C>
1152-
std::unique_ptr<NvmItem> NvmCache<C>::makeNvmItem(const Item& item) {
1153-
auto poolId = cache_.getAllocInfo((void*)(&item)).poolId;
1154-
1152+
std::unique_ptr<NvmItem> NvmCache<C>::makeNvmItem(const Item& item,
1153+
uint8_t poolId) {
11551154
if (item.isChainedItem()) {
11561155
throw std::invalid_argument(folly::sformat(
11571156
"Chained item can not be flushed separately {}", item.toString()));
@@ -1244,7 +1243,10 @@ void NvmCache<C>::put(Item& item, PutToken token) {
12441243
return;
12451244
}
12461245

1247-
auto nvmItem = makeNvmItem(item);
1246+
auto poolId =
1247+
static_cast<uint8_t>(cache_.getAllocInfo((void*)(&item)).poolId);
1248+
auto expiryTime = item.getExpiryTime();
1249+
auto nvmItem = makeNvmItem(item, poolId);
12481250
if (!nvmItem) {
12491251
stats().numNvmPutEncodeFailure.inc();
12501252
recordEvent(AllocatorApiEvent::NVM_INSERT, item.getKey(),
@@ -1292,7 +1294,7 @@ void NvmCache<C>::put(Item& item, PutToken token) {
12921294
recordEvent(AllocatorApiEvent::NVM_INSERT, key.key(), eventRes);
12931295
putCleanup();
12941296
},
1295-
item.getLastAccessTime());
1297+
poolId, expiryTime, item.getLastAccessTime());
12961298

12971299
if (status == navy::Status::Ok) {
12981300
guard.dismiss();

cachelib/allocator/nvmcache/tests/NvmTestBase.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ class NvmCacheTest : public testing::Test {
192192
}
193193

194194
std::unique_ptr<NvmItem> makeNvmItem(const Item& item) {
195-
return getNvmCache()->makeNvmItem(item);
195+
auto poolId =
196+
static_cast<uint8_t>(cache().getAllocInfo((void*)(&item)).poolId);
197+
return getNvmCache()->makeNvmItem(item, poolId);
196198
}
197199

198200
std::unique_ptr<folly::IOBuf> createItemAsIOBuf(folly::StringPiece key,

cachelib/navy/AbstractCache.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class AbstractCache {
7272
// ItemMetadata as a param.
7373
virtual Status insert(HashedKey key,
7474
BufferView value,
75+
uint8_t poolId = 0,
76+
uint32_t expiryTime = 0,
7577
uint32_t lastAccessTimeSecs = 0) = 0;
7678

7779
// Asynchronously inserts entry into the cache.
@@ -84,6 +86,8 @@ class AbstractCache {
8486
virtual Status insertAsync(HashedKey key,
8587
BufferView value,
8688
InsertCallback cb,
89+
uint8_t poolId = 0,
90+
uint32_t expiryTime = 0,
8791
uint32_t lastAccessTimeSecs = 0) = 0;
8892

8993
// Looks up value. Returns non-null buffer if found.

cachelib/navy/bighash/BigHash.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ bool BigHash::recover(RecordReader& rr) {
294294

295295
Status BigHash::insert(HashedKey hk,
296296
BufferView value,
297+
uint8_t /* poolId */,
298+
uint32_t /* expiryTime */,
297299
uint32_t /* lastAccessTimeSecs */) {
298300
const auto bid = getBucketId(hk);
299301
insertCount_.inc();

cachelib/navy/bighash/BigHash.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ class BigHash final : public Engine, folly::NonCopyableNonMovable {
122122
// key if found. If it failed to write, it will return DeviceError.
123123
Status insert(HashedKey hk,
124124
BufferView value,
125+
uint8_t poolId = 0,
126+
uint32_t expiryTime = 0,
125127
uint32_t lastAccessTimeSecs = 0) override;
126128

127129
// Removes an entry from BigHash if found. Ok on success, NotFound on miss,

cachelib/navy/bighash/tests/BigHashTest.cpp

Lines changed: 94 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ TEST(BigHash, InsertAndRemove) {
6868
uint32_t lat = 0;
6969
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("key"), value, lat));
7070

71-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
71+
EXPECT_EQ(Status::Ok,
72+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
73+
0 /* expiryTime */));
7274
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
7375
EXPECT_EQ(makeView("12345"), value.view());
7476

@@ -91,7 +93,9 @@ TEST(BigHash, CouldExistWithoutBF) {
9193
EXPECT_EQ(true, bh.couldExist(makeHK("key")));
9294
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("key"), value, lat));
9395

94-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
96+
EXPECT_EQ(Status::Ok,
97+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
98+
0 /* expiryTime */));
9599
EXPECT_EQ(true, bh.couldExist(makeHK("key")));
96100
EXPECT_EQ(Status::Ok, bh.remove(makeHK("key")));
97101
EXPECT_EQ(true, bh.couldExist(makeHK("key")));
@@ -116,7 +120,9 @@ TEST(BigHash, CouldExistWithBF) {
116120
EXPECT_EQ(false, bh.couldExist(makeHK("key")));
117121
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("key"), value, lat));
118122

119-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
123+
EXPECT_EQ(Status::Ok,
124+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
125+
0 /* expiryTime */));
120126
EXPECT_EQ(true, bh.couldExist(makeHK("key")));
121127
EXPECT_EQ(Status::Ok, bh.remove(makeHK("key")));
122128
EXPECT_EQ(false, bh.couldExist(makeHK("key")));
@@ -133,7 +139,9 @@ TEST(BigHash, SimpleStats) {
133139
Buffer value;
134140
uint32_t lat = 0;
135141
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("key"), value, lat));
136-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
142+
EXPECT_EQ(Status::Ok,
143+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
144+
0 /* expiryTime */));
137145
{
138146
MockCounterVisitor helper;
139147
EXPECT_CALL(helper, call(_, _)).Times(AtLeast(0));
@@ -184,8 +192,12 @@ TEST(BigHash, EvictionStats) {
184192

185193
BigHash bh(std::move(config));
186194

187-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key1"), makeView("12345")));
188-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key2"), makeView("123456789")));
195+
EXPECT_EQ(Status::Ok,
196+
bh.insert(makeHK("key1"), makeView("12345"), 0 /* poolId */,
197+
0 /* expiryTime */));
198+
EXPECT_EQ(Status::Ok,
199+
bh.insert(makeHK("key2"), makeView("123456789"), 0 /* poolId */,
200+
0 /* expiryTime */));
189201
{
190202
MockCounterVisitor helper;
191203
EXPECT_CALL(helper, call(_, _)).Times(AtLeast(0));
@@ -214,9 +226,13 @@ TEST(BigHash, DeviceErrorStats) {
214226

215227
BigHash bh(std::move(config));
216228

217-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key1"), makeView("1")));
229+
EXPECT_EQ(Status::Ok,
230+
bh.insert(makeHK("key1"), makeView("1"), 0 /* poolId */,
231+
0 /* expiryTime */));
218232
EXPECT_CALL(*device, writeImpl(0, 64, _, _)).WillOnce(Return(false));
219-
EXPECT_EQ(Status::DeviceError, bh.insert(makeHK("key2"), makeView("1")));
233+
EXPECT_EQ(Status::DeviceError,
234+
bh.insert(makeHK("key2"), makeView("1"), 0 /* poolId */,
235+
0 /* expiryTime */));
220236
{
221237
MockCounterVisitor helper;
222238
EXPECT_CALL(helper, call(_, _)).Times(AtLeast(0));
@@ -251,15 +267,19 @@ TEST(BigHash, DoubleInsert) {
251267
Buffer value;
252268
uint32_t lat = 0;
253269

254-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
270+
EXPECT_EQ(Status::Ok,
271+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
272+
0 /* expiryTime */));
255273
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
256274
EXPECT_EQ(makeView("12345"), value.view());
257275

258276
EXPECT_CALL(helper,
259277
call(makeHK("key"), makeView("12345"), DestructorEvent::Removed));
260278

261279
// Insert the same key a second time will overwrite the previous value.
262-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("45678")));
280+
EXPECT_EQ(Status::Ok,
281+
bh.insert(makeHK("key"), makeView("45678"), 0 /* poolId */,
282+
0 /* expiryTime */));
263283
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
264284
EXPECT_EQ(makeView("45678"), value.view());
265285
}
@@ -280,8 +300,12 @@ TEST(BigHash, DestructorCallback) {
280300
config.destructorCb = toCallback(helper);
281301

282302
BigHash bh(std::move(config));
283-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 1"), makeView("value 1")));
284-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 2"), makeView("value 2")));
303+
EXPECT_EQ(Status::Ok,
304+
bh.insert(makeHK("key 1"), makeView("value 1"), 0 /* poolId */,
305+
0 /* expiryTime */));
306+
EXPECT_EQ(Status::Ok,
307+
bh.insert(makeHK("key 2"), makeView("value 2"), 0 /* poolId */,
308+
0 /* expiryTime */));
285309
EXPECT_EQ(Status::Ok, bh.remove(makeHK("key 2")));
286310
}
287311

@@ -313,7 +337,9 @@ TEST(BigHash, Reset) {
313337
Buffer value;
314338
uint32_t lat = 0;
315339

316-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
340+
EXPECT_EQ(Status::Ok,
341+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
342+
0 /* expiryTime */));
317343
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
318344
EXPECT_EQ(makeView("12345"), value.view());
319345
auto oldBucketContent = readFirstBucket();
@@ -327,7 +353,9 @@ TEST(BigHash, Reset) {
327353
// The new bucket content must be identical to that of the old since
328354
// after a reset, our first write is equivalent to writing to a brand
329355
// new bucket.
330-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
356+
EXPECT_EQ(Status::Ok,
357+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
358+
0 /* expiryTime */));
331359
auto newBucketContent = readFirstBucket();
332360
EXPECT_EQ(oldBucketContent.view(), newBucketContent.view());
333361
}
@@ -367,9 +395,15 @@ TEST(BigHash, WriteInTwoBuckets) {
367395

368396
BigHash bh(std::move(config));
369397

370-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("A"), makeView("12345")));
371-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("B"), makeView("45678")));
372-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("C"), makeView("67890")));
398+
EXPECT_EQ(Status::Ok,
399+
bh.insert(makeHK("A"), makeView("12345"), 0 /* poolId */,
400+
0 /* expiryTime */));
401+
EXPECT_EQ(Status::Ok,
402+
bh.insert(makeHK("B"), makeView("45678"), 0 /* poolId */,
403+
0 /* expiryTime */));
404+
EXPECT_EQ(Status::Ok,
405+
bh.insert(makeHK("C"), makeView("67890"), 0 /* poolId */,
406+
0 /* expiryTime */));
373407
}
374408

375409
TEST(BigHash, RemoveNotFound) {
@@ -391,7 +425,8 @@ TEST(BigHash, RemoveNotFound) {
391425

392426
BigHash bh(std::move(config));
393427

394-
bh.insert(makeHK("key"), makeView("12345"));
428+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
429+
0 /* expiryTime */);
395430
bh.remove(makeHK("key"));
396431
bh.remove(makeHK("key"));
397432
}
@@ -407,7 +442,8 @@ TEST(BigHash, CorruptBucket) {
407442

408443
BigHash bh(std::move(config));
409444

410-
bh.insert(makeHK("key"), makeView("12345"));
445+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
446+
0 /* expiryTime */);
411447

412448
Buffer value;
413449
uint32_t lat = 0;
@@ -434,7 +470,9 @@ TEST(BigHash, Recovery) {
434470

435471
Buffer value;
436472
uint32_t lat = 0;
437-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
473+
EXPECT_EQ(Status::Ok,
474+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
475+
0 /* expiryTime */));
438476
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
439477
EXPECT_EQ(makeView("12345"), value.view());
440478

@@ -463,7 +501,9 @@ TEST(BigHash, RecoveryBadConfig) {
463501

464502
Buffer value;
465503
uint32_t lat = 0;
466-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
504+
EXPECT_EQ(Status::Ok,
505+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
506+
0 /* expiryTime */));
467507
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
468508
EXPECT_EQ(makeView("12345"), value.view());
469509

@@ -496,7 +536,9 @@ TEST(BigHash, RecoveryCorruptedData) {
496536
Buffer value;
497537
uint32_t lat = 0;
498538

499-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key"), makeView("12345")));
539+
EXPECT_EQ(Status::Ok,
540+
bh.insert(makeHK("key"), makeView("12345"), 0 /* poolId */,
541+
0 /* expiryTime */));
500542
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("key"), value, lat));
501543
EXPECT_EQ(makeView("12345"), value.view());
502544

@@ -521,9 +563,15 @@ TEST(BigHash, ConcurrentRead) {
521563
config.device = device.get();
522564

523565
BigHash bh(std::move(config));
524-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 1"), makeView("1")));
525-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 2"), makeView("2")));
526-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 3"), makeView("3")));
566+
EXPECT_EQ(Status::Ok,
567+
bh.insert(makeHK("key 1"), makeView("1"), 0 /* poolId */,
568+
0 /* expiryTime */));
569+
EXPECT_EQ(Status::Ok,
570+
bh.insert(makeHK("key 2"), makeView("2"), 0 /* poolId */,
571+
0 /* expiryTime */));
572+
EXPECT_EQ(Status::Ok,
573+
bh.insert(makeHK("key 3"), makeView("3"), 0 /* poolId */,
574+
0 /* expiryTime */));
527575

528576
struct MockLookupHelper {
529577
MOCK_METHOD2(call, void(HashedKey, BufferView));
@@ -592,7 +640,9 @@ TEST(BigHash, BloomFilter) {
592640
BigHash bh(std::move(config));
593641
BufferGen bg;
594642

595-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("100"), bg.gen(20).view()));
643+
EXPECT_EQ(Status::Ok,
644+
bh.insert(makeHK("100"), bg.gen(20).view(), 0 /* poolId */,
645+
0 /* expiryTime */));
596646

597647
// Check that eviction triggers BF rebuild. Use the following setup:
598648
// - Insert "100". BF rejects "101" and accepts "102" and "103".
@@ -615,11 +665,15 @@ TEST(BigHash, BloomFilter) {
615665
EXPECT_EQ(1, bh.bfRejectCount());
616666

617667
// Insert "101"
618-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("101"), bg.gen(20).view()));
668+
EXPECT_EQ(Status::Ok,
669+
bh.insert(makeHK("101"), bg.gen(20).view(), 0 /* poolId */,
670+
0 /* expiryTime */));
619671
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("110"), value, lat));
620672
EXPECT_EQ(2, bh.bfRejectCount());
621673

622-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("110"), bg.gen(20).view()));
674+
EXPECT_EQ(Status::Ok,
675+
bh.insert(makeHK("110"), bg.gen(20).view(), 0 /* poolId */,
676+
0 /* expiryTime */));
623677
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("101"), value, lat));
624678
EXPECT_EQ(Status::Ok, bh.lookup(makeHK("110"), value, lat));
625679
EXPECT_EQ(2, bh.bfRejectCount());
@@ -656,7 +710,9 @@ TEST(BigHash, BloomFilterRecovery) {
656710
config.bloomFilter = std::make_unique<BloomFilter>(2, 1, 4);
657711

658712
BigHash bh(std::move(config));
659-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("100"), makeView("cat")));
713+
EXPECT_EQ(Status::Ok,
714+
bh.insert(makeHK("100"), makeView("cat"), 0 /* poolId */,
715+
0 /* expiryTime */));
660716
Buffer value;
661717
uint32_t lat = 0;
662718
EXPECT_EQ(Status::NotFound, bh.lookup(makeHK("200"), value, lat));
@@ -718,12 +774,16 @@ TEST(BigHash, DestructorCallbackOutsideLock) {
718774
};
719775

720776
BigHash bh(std::move(config));
721-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 1"), makeView("value 1")));
777+
EXPECT_EQ(Status::Ok,
778+
bh.insert(makeHK("key 1"), makeView("value 1"), 0 /* poolId */,
779+
0 /* expiryTime */));
722780

723781
// insert will hang in the destructor, but lock should be released once
724782
// destructorCB starts
725783
std::thread t([&]() {
726-
EXPECT_EQ(Status::Ok, bh.insert(makeHK("key 1"), makeView("value 2")));
784+
EXPECT_EQ(Status::Ok,
785+
bh.insert(makeHK("key 1"), makeView("value 2"), 0 /* poolId */,
786+
0 /* expiryTime */));
727787
});
728788

729789
// wait until destructor started, which means bucket lock is released
@@ -752,7 +812,9 @@ TEST(BigHash, RandomAlloc) {
752812
auto keyStr = genKey(4, bid);
753813
sprintf((char*)data.data(),
754814
"data_%8s PAYLOAD: ", &keyStr[keyStr.size() - 8]);
755-
EXPECT_EQ(Status::Ok, bh.insert(makeHK(keyStr.c_str()), data.view()));
815+
EXPECT_EQ(Status::Ok,
816+
bh.insert(makeHK(keyStr.c_str()), data.view(), 0 /* poolId */,
817+
0 /* expiryTime */));
756818
}
757819
}
758820

cachelib/navy/block_cache/BlockCache.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ uint32_t BlockCache::serializedSize(uint32_t keySize,
247247

248248
Status BlockCache::insert(HashedKey hk,
249249
BufferView value,
250+
uint8_t /* poolId */,
251+
uint32_t /* expiryTime */,
250252
uint32_t lastAccessTimeSecs) {
251253
auto start = getSteadyClock();
252254
SCOPE_EXIT {

0 commit comments

Comments
 (0)