MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / clear_log_folder

Function clear_log_folder

tools/comdb2ar/incr_deserialise.cpp:444–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void clear_log_folder(
445 const std::string& datadestdir,
446 const std::string& dbname
447)
448// We don't want log file holes, so after each increment, remove all existing logs
449// unless in keep_all_logs mode
450{
451 // remove files in the txn directory
452 std::string dbtxndir(datadestdir + "/" + dbname + ".txn");
453 make_dirs( dbtxndir );
454 remove_all_old_files( dbtxndir );
455 dbtxndir = datadestdir + "/" + "logs";
456 make_dirs( dbtxndir );
457 remove_all_old_files( dbtxndir );
458}

Callers 2

restore_partialsFunction · 0.85

Calls 2

make_dirsFunction · 0.85
remove_all_old_filesFunction · 0.85

Tested by

no test coverage detected