The candidate needs to be cleared even when processing
replicated candidate(ie on a follower) as there is no need
to keep it deserialized in memory
JIRA: CONTROLLER-1928
Change-Id: I1403dbe27def5e0040a8d9f145a92ac06aae9d1e
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
private void applyReplicatedCandidate(final CommitTransactionPayload payload)
throws DataValidationFailedException, IOException {
private void applyReplicatedCandidate(final CommitTransactionPayload payload)
throws DataValidationFailedException, IOException {
- final Entry<TransactionIdentifier, DataTreeCandidateWithVersion> entry = payload.getCandidate();
+ final Entry<TransactionIdentifier, DataTreeCandidateWithVersion> entry = payload.acquireCandidate();
final TransactionIdentifier identifier = entry.getKey();
LOG.debug("{}: Applying foreign transaction {}", logContext, identifier);
final TransactionIdentifier identifier = entry.getKey();
LOG.debug("{}: Applying foreign transaction {}", logContext, identifier);