diff --git a/cache/lru_cache_test.cc b/cache/lru_cache_test.cc index 45eb1fbe4..5f75649d5 100644 --- a/cache/lru_cache_test.cc +++ b/cache/lru_cache_test.cc @@ -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 diff --git a/include/rocksdb/tiered_cache.h b/include/rocksdb/tiered_cache.h index 9af168b36..a66e83e0c 100644 --- a/include/rocksdb/tiered_cache.h +++ b/include/rocksdb/tiered_cache.h @@ -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