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:
parent
361409e7e1
commit
c6286c0384
@ -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 "
|
||||
|
Loading…
x
Reference in New Issue
Block a user