From 128aba64fefed54232fe20a22a83293f6a269533 Mon Sep 17 00:00:00 2001 From: elblasco <64553614+elblasco@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:06:20 +0200 Subject: [PATCH] del: epoch pair from synch messages --- src/main/java/it/unitn/disi/ds1/qtop/Node.java | 13 +++---------- src/main/java/it/unitn/disi/ds1/qtop/Utils.java | 5 ++--- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main/java/it/unitn/disi/ds1/qtop/Node.java b/src/main/java/it/unitn/disi/ds1/qtop/Node.java index 504f10c..2164454 100644 --- a/src/main/java/it/unitn/disi/ds1/qtop/Node.java +++ b/src/main/java/it/unitn/disi/ds1/qtop/Node.java @@ -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() ); } @@ -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 ); } diff --git a/src/main/java/it/unitn/disi/ds1/qtop/Utils.java b/src/main/java/it/unitn/disi/ds1/qtop/Utils.java index 4ee2ef2..90fe998 100644 --- a/src/main/java/it/unitn/disi/ds1/qtop/Utils.java +++ b/src/main/java/it/unitn/disi/ds1/qtop/Utils.java @@ -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 { } /**