diff --git a/src/main/java/org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutor.java b/src/main/java/org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutor.java index 81abd61..65689ca 100644 --- a/src/main/java/org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutor.java +++ b/src/main/java/org/bdware/consistency/plugin/sharding/MultiPointCooperationExecutor.java @@ -87,7 +87,7 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut "[sendRequests] get cmNode " + node.substring(0, 5) + " not null " - + "org.bdware.consistency.plugin.ra.RequestAllExecutor 发送请求给 " + + "RequestAllExecutor 发送请求给 " + node.substring(0, 5)); networkManager.sendToAgent(node, sendStr); } @@ -137,9 +137,9 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut // List nodes = info.members; int validNode = 0; for (String node : nodes) { - if (networkManager.hasAgentConnection(node) - && masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID) - == RecoverFlag.Fine) { + if (networkManager.hasAgentConnection(node)) { + //&& masterServerRecoverMechAction.getRecoverStatusMap().get(node).get(contractID) + // == RecoverFlag.Fine validNode++; } } @@ -151,7 +151,7 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut @Override public void execute(String requestID, ContractRequest req, ResultCallback rc, OnHashCallback hcb) { - LOGGER.info("[org.bdware.consistency.plugin.sharding.MultiPointCooperationExecutor] execute " + JsonUtil.toJson(req)); + LOGGER.info("[MultiPointCooperationExecutor] execute " + JsonUtil.toJson(req)); // 获得action 函数名 LOGGER.info("action is : " + req.getAction()); req.setContractID(cmActions.getManager().getContractIDByName(req.getContractID())); @@ -208,13 +208,12 @@ public class MultiPointCooperationExecutor extends AbstractContextContractExecut private int getJoinCount(JoinInfo joinInfo, String contractID) { if (joinInfo == null) return resultCount; - if (joinInfo.joinCount.isJsonPrimitive() && joinInfo.joinCount.getAsJsonPrimitive().isNumber()) { - return joinInfo.joinCount.getAsJsonPrimitive().getAsInt(); - } + if (joinInfo != null) return joinInfo.joinCount; + try { ContractRequest cr = new ContractRequest(); cr.setContractID(contractID); - cr.setAction(joinInfo.joinCount.getAsString()); + cr.setAction("TODO"); //TODO Arg需要好好设计一下。 //TODO 又好用又简单的那种设计 //TODO