This commit is contained in:
Antonio Andelic 2024-04-02 13:58:17 +02:00
parent 24b02dc9b8
commit 66cd879d2d
2 changed files with 2 additions and 2 deletions

View File

@ -2219,7 +2219,7 @@ uint64_t Changelog::getStartIndex() const
LogEntryPtr Changelog::getLastEntry() const
{
/// This entry treaded in special way by NuRaft
static LogEntryPtr fake_entry = nuraft::cs_new<nuraft::log_entry>(0, nuraft::buffer::alloc(sizeof(uint64_t)));
static LogEntryPtr fake_entry = nuraft::cs_new<nuraft::log_entry>(0, nuraft::buffer::alloc(0));
auto entry = entry_storage.getEntry(max_log_id);
if (entry == nullptr)

View File

@ -16,7 +16,7 @@ ptr<log_entry> makeClone(const ptr<log_entry> & entry)
InMemoryLogStore::InMemoryLogStore()
: start_idx(1)
{
nuraft::ptr<nuraft::buffer> buf = nuraft::buffer::alloc(sizeof(uint64_t));
nuraft::ptr<nuraft::buffer> buf = nuraft::buffer::alloc(0);
logs[0] = nuraft::cs_new<nuraft::log_entry>(0, buf);
}