Add page cache for column page in BetaRowset (#1607)

This commit is contained in:
ZHAO Chun
2019-08-12 10:42:00 +08:00
committed by GitHub
parent cf2155cf45
commit 2bd01b23c7
12 changed files with 334 additions and 16 deletions

View File

@ -353,6 +353,11 @@ void* ShardedLRUCache::value(Handle* handle) {
return reinterpret_cast<LRUHandle*>(handle)->value;
}
Slice ShardedLRUCache::value_slice(Handle* handle) {
auto lru_handle = reinterpret_cast<LRUHandle*>(handle);
return Slice((char*)lru_handle->value, lru_handle->charge);
}
uint64_t ShardedLRUCache::new_id() {
MutexLock l(&_id_mutex);
return ++(_last_id);