// // Created by Kirill Zhukov on 20.04.2025. // #ifndef RECOVERYLOG_H #define RECOVERYLOG_H #include #include #include #include #include "utils/hash/Hash128.h" namespace usub::utils { class RecoveryLog { public: explicit RecoveryLog(const std::string& dbname); ~RecoveryLog(); void log_put(const std::string& key, const std::string& value); void log_delete(const std::string& key); void replay(const std::function& callback) const; private: void ensure_metadata_dir() const; private: std::string db_name; std::string metadata_dir; std::string log_file; std::ofstream log_out; }; } // utils // usub #endif //RECOVERYLOG_H