1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

F #4809: Safer purge function for RAFT log

This commit is contained in:
Ruben S. Montero 2017-06-28 19:50:55 +02:00
parent 361409e7e1
commit c6286c0384

View File

@ -531,7 +531,7 @@ int LogDB::purge_log()
return 0;
}
unsigned int delete_index = last_index - log_retention;
unsigned int delete_index = last_applied - log_retention;
// keep the last "log_retention" records as well as those not applied to DB
oss << "DELETE FROM logdb WHERE timestamp > 0 AND log_index >= 0 "