Closed kkli08 closed 2 months ago
Generate names for SSTs:
string Memtable::generateSstFilename() { auto now = std::chrono::system_clock::now(); auto in_time_t = std::chrono::system_clock::to_time_t(now); std::stringstream ss; ss << std::put_time(std::localtime(&in_time_t), "%Y_%m_%d_%H%M"); return ss.str() + ".sst"; }
Design need to be refined: Generate name by the time (accurate to the minute), it may cause some unpredictable issues
https://github.com/kkli08/KV-Store/blob/main/memtable/Memtable.cpp#L123-L140
Generate names for SSTs: