统计数据历史差值使用未加锁的 uint64 减法,因此 Statistics::Reset() 会记录接近 2^64 的计数(也会保存到磁盘)
作者: hanke580创建于 2026年9月22日更新于 2026年9月22日
// line 1396 — persist_stats_to_disk == true if (stats_slice_.find(stat.first) != stats_slice_.end()) { uint64_t delta = stat.second - stats_slice_[stat.first]; s = batch.Put(persist_stats_cf_handle_, Slice(key, std::min(100, length)), std::to_string(delta)); }
内容来源: facebook/rocksdb