提交 e7393083 编写于 作者: L liquidsnake@sapo.pt

Fixed a small bug on the reconfiguration

上级 0b752909
......@@ -159,7 +159,7 @@ public class ReconfigurationManager extends ViewManager {
//ret = reconfigure(updates.get(i).getContent());
return reconfigure(jSetInfo, jSet, rSet, f, eid, decisionRound, null);
return reconfigure(jSetInfo, jSet, rSet, f, eid, decisionRound);
}
private boolean contains(int id, List<Integer> list) {
......@@ -171,7 +171,7 @@ public class ReconfigurationManager extends ViewManager {
return false;
}
private byte[] reconfigure(List<String> jSetInfo, List<Integer> jSet, List<Integer> rSet, int f, int eid, int decisionRound, byte[] state) {
private byte[] reconfigure(List<String> jSetInfo, List<Integer> jSet, List<Integer> rSet, int f, int eid, int decisionRound) {
//ReconfigureRequest request = (ReconfigureRequest) TOMUtil.getObject(req);
// Hashtable<Integer, String> props = request.getProperties();
// int f = Integer.valueOf(props.get(CHANGE_F));
......@@ -208,7 +208,7 @@ public class ReconfigurationManager extends ViewManager {
return TOMUtil.getBytes(new ReconfigureReply(newV, jSetInfo.toArray(new String[0]),
tomLayer.getLastExec(), tomLayer.lm.getLeader(eid, decisionRound), state));
tomLayer.getLastExec(), tomLayer.lm.getLeader(eid, decisionRound)));
}
public TOMMessage[] clearUpdates() {
......
......@@ -28,17 +28,13 @@ public class ReconfigureReply implements Externalizable {
private int execLeader = -1;
private byte[] startState;
public ReconfigureReply() {
}
public ReconfigureReply(View newView, String[] joinSet, int lastExectConsensus, int leader, byte[] startState) {
public ReconfigureReply(View newView, String[] joinSet, int lastExectConsensus, int leader) {
this.newView = newView;
this.lastExecConsId = lastExectConsensus;
this.execLeader = leader;
this.startState = startState;
if(joinSet == null){
this.joinSet = new String[0];
......@@ -49,13 +45,7 @@ public class ReconfigureReply implements Externalizable {
public View getView() {
return newView;
}
public byte[] getStartState() {
return this.startState;
}
}
public String[] getJoinSet() {
return joinSet;
......@@ -84,13 +74,7 @@ public class ReconfigureReply implements Externalizable {
for(int i=0; i < joinSet.length;i++){
out.writeUTF(joinSet[i]);
}
out.writeInt(startState.length);
out.write(startState);
}
}
@Override
......@@ -102,10 +86,6 @@ public class ReconfigureReply implements Externalizable {
for(int i = 0; i < joinSet.length;i++){
joinSet[i] = in.readUTF();
}
this.startState = new byte[in.readInt()];
in.read(this.startState);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册