This commit is contained in:
Antonio Andelic 2023-02-01 14:25:58 +01:00 committed by GitHub
parent 5de6f86c27
commit 88c1744975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,8 +157,8 @@ public:
assert(file_buffer && current_file_description);
assert(record.header.index - getStartIndex() <= current_file_description->expectedEntriesCountInLog());
if (const bool log_is_complete = record.header.index - getStartIndex() == current_file_description->expectedEntriesCountInLog();
log_is_complete)
// check if log file reached the limit for amount of records it can contain
if (record.header.index - getStartIndex() == current_file_description->expectedEntriesCountInLog())
{
rotate(record.header.index);
}