Fix comments and an ASSERT_STATUS_CHECKED bug

This commit is contained in:
anand76 2021-04-01 10:23:13 -07:00
parent 8015fc9871
commit b42d4a8ad4
2 changed files with 6 additions and 5 deletions

View File

@ -345,7 +345,7 @@ TEST_F(LRUCacheTest, TestTieredCache) {
Random rnd(301);
std::string str1 = rnd.RandomString(1020);
TestItem* item1 = new TestItem(str1.data(), str1.length());
cache->Insert("k1", item1, helper_cb, str1.length());
ASSERT_OK(cache->Insert("k1", item1, helper_cb, str1.length()));
std::string str2 = rnd.RandomString(1020);
TestItem* item2 = new TestItem(str2.data(), str2.length());
// k2 should be demoted to NVM

View File

@ -48,15 +48,16 @@ class TieredCache {
virtual std::string Name() = 0;
// Insert the given value into the NVM cache. The value is not written
// Insert the given value into this tier. The value is not written
// directly. Rather, the SaveToCallback provided by helper_cb will be
// used to extract the persistable data in value, which will be written
// to this tier. The implementation may or may not write it to NVM depending
// on the admission control policy, even if the return status is success.
// to this tier. The implementation may or may not write it to cache
// depending on the admission control policy, even if the return status is
// success.
virtual Status Insert(const Slice& key, void* value,
Cache::CacheItemHelperCallback helper_cb) = 0;
// Lookup the data for the given key in the NVM cache. The create_cb
// Lookup the data for the given key in this tier. The create_cb
// will be used to create the object. The handle returned may not be
// ready yet, unless wait=true, in which case Lookup() will block until
// the handle is ready