From ee5658e776839088da75a481df7a99f224aa8d14 Mon Sep 17 00:00:00 2001
From: mrossign <mrossign@localhost>
Date: Tue, 16 Dec 2008 17:03:47 +0000
Subject: [PATCH] Assured Replication: - all unit tests for safe data mode - assured replication code corrections (thanks to safe data unit tests) => Still every unit tests for safe read mode to do...
---
opends/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java b/opends/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java
index 62fb049..e5cb702 100644
--- a/opends/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java
+++ b/opends/src/server/org/opends/server/replication/server/SafeReadExpectedAcksInfo.java
@@ -30,9 +30,7 @@
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.opends.server.replication.common.AssuredMode;
import org.opends.server.replication.common.ChangeNumber;
import org.opends.server.replication.protocol.AckMsg;
@@ -65,18 +63,6 @@
private List<Short> failedServers = null;
/**
- * This gives the list of servers we are willing to wait acks from and the
- * information about the ack from the servers.
- * key: the id of the server.
- * value: a boolean true if we received the ack from the server,
- * false otherwise.
- * This must not include servers we already identified they are in wrong
- * status, but just servers that are in normal status.
- */
- private Map<Short,Boolean> expectedServersAckStatus =
- new HashMap<Short,Boolean>();
-
- /**
* Number of servers we want an ack from and from which we received the ack.
* Said differently: the number of servers in expectedServersAckStatus whose
* value is true. When this value reaches the size of expectedServersAckStatus
@@ -100,7 +86,8 @@
ServerHandler requesterServerHandler, List<Short> expectedServers,
List<Short> wrongStatusServers)
{
- super(changeNumber, requesterServerHandler, AssuredMode.SAFE_READ_MODE);
+ super(changeNumber, requesterServerHandler, AssuredMode.SAFE_READ_MODE,
+ expectedServers);
// Keep track of potential servers detected in wrong status
if (wrongStatusServers.size() > 0)
@@ -108,12 +95,6 @@
hasWrongStatus = true;
failedServers = wrongStatusServers;
}
-
- // Initialize list of servers we expect acks from
- for (Short serverId : expectedServers)
- {
- expectedServersAckStatus.put(serverId, false);
- }
}
/**
--
Gitblit v1.10.0