Skip to content

Commit

Permalink
del: epoch pair from synch messages
Browse files Browse the repository at this point in the history
  • Loading branch information
elblasco committed Aug 7, 2024
1 parent 7a9a3ff commit 128aba6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 3 additions & 10 deletions src/main/java/it/unitn/disi/ds1/qtop/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,8 @@ private void onSynchronisation(@NotNull Synchronisation msg) {
this.startHeartBeatCountDown();
logger.log(
LogLevel.INFO,
"[NODE-" + this.nodeId + "] received synchronisation message from coordinator, the new epoch is going" + " to be <" + msg.newEpochPair()
.e() + ", " + msg.newEpochPair()
.i() + ">" + "last value is now : " + this.history.readValidVariable()
"[NODE-" + this.nodeId + "] received synchronisation message from coordinator, the new epoch is going "
+ "last value is now : " + this.history.readValidVariable()
);
}

Expand Down Expand Up @@ -584,13 +583,7 @@ private void onElection(@NotNull Election msg) {
this.getSelf()
);
this.multicast(
new Synchronisation(
new PairsHistory(this.history),
new Utils.EpochPair(
this.history.getLatestCommitted().e(),
this.history.getLatestCommitted().i()
)
),
new Synchronisation(new PairsHistory(this.history)),
false
);
}
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/it/unitn/disi/ds1/qtop/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,9 @@ public record ElectionACK() implements Serializable {
/**
* Message to synchronise all the node after an election.
*
* @param history the new history of transactions
* @param newEpochPair the new epoch pair
* @param history the new history of transactions
*/
public record Synchronisation(PairsHistory history, EpochPair newEpochPair) implements Serializable {
public record Synchronisation(PairsHistory history) implements Serializable {
}

/**
Expand Down

0 comments on commit 128aba6

Please sign in to comment.