Microsoft Faster KV
引擎 介绍hashtable
+ log
文件union {
struct {
uint64_t address_ : 48; // corresponds to logical address一般指针只用到48位
uint64_t tag_ : 14; //用来保存一段hash
uint64_t reserved_ : 1;
uint64_t tentative_ : 1; //如果是1,说明在外面
};
uint64_t control_;
};
union {
struct {
uint64_t previous_address_ : 48; //冲突的key 链表节点
uint64_t checkpoint_version : 13;
uint64_t invalid : 1;
uint64_t tombstone : 1;
uint64_t final_bit : 1;
};
uint64_t control_;
};
Device
disk
设计 FileSystemDisk
azure
存储作为device disk
的方案
fake device
的方案 MemoryPoolDisk
epoch
epoch
原理文字版thread-local
版本的E,即Et,它会周期性刷新。而Et保存在一个共享的epoch表中,每个线程使用1个cache line
大小。Et>c
。而系统会维护一个最大的安全epoch Es
。因此有Es<ET≤ E
epoch
+ 双buffer
切换disk
,备份存在的问题compact
涉及到的方案设计compact
存在的问题