Skip to content

Commit

Permalink
Merge pull request #1346 from andrewjstone/msg-deletion-fix
Browse files Browse the repository at this point in the history
Fix for deletion of messages that are being used. (#1342)
  • Loading branch information
andrewjstone authored Apr 2, 2021
2 parents d2cd577 + ff54a58 commit dba6424
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bftengine/src/bftengine/ReplicaLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ ReplicaLoader::ErrorCode loadViewInfo(shared_ptr<PersistentStorage> &p, LoadedRe
descriptorOfLastNewView.viewChangeMsgs);

ld.maxSeqNumTransferredFromPrevViews = descriptorOfLastNewView.maxSeqNumTransferredFromPrevViews;
// we have not used descriptorOfLastExitFromView, therefore
// we need to clean up the messages we have allocated inside it.
descriptorOfLastExitFromView.clean();
} else {
LOG_ERROR(GL,
"Failed to load view (inconsistent state): " << KVLOG(
Expand All @@ -183,7 +186,6 @@ ReplicaLoader::ErrorCode loadViewInfo(shared_ptr<PersistentStorage> &p, LoadedRe
}

ld.viewsManager = viewsManager;
descriptorOfLastExitFromView.clean();
return Succ;
}

Expand Down

0 comments on commit dba6424

Please sign in to comment.