diff --git a/state-engine/src/main/java/scheduler/struct/og/TaskPrecedenceGraph.java b/state-engine/src/main/java/scheduler/struct/og/TaskPrecedenceGraph.java index 66d1a38ab..2b7155b2a 100644 --- a/state-engine/src/main/java/scheduler/struct/og/TaskPrecedenceGraph.java +++ b/state-engine/src/main/java/scheduler/struct/og/TaskPrecedenceGraph.java @@ -48,25 +48,25 @@ public class TaskPrecedenceGraph { private final int app; public void reset(Context context) { - //reset holder. - if (app == 0) { - operationChains.get("MicroTable").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - } else if (app == 1) { - operationChains.get("accounts").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - operationChains.get("bookEntries").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - } else if (app == 2 ) { - operationChains.get("segment_speed").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - operationChains.get("segment_cnt").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - } else if (app == 3) { - operationChains.get("goods").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); - } +// //reset holder. +// if (app == 0) { +// operationChains.get("MicroTable").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// } else if (app == 1) { +// operationChains.get("accounts").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// operationChains.get("bookEntries").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// } else if (app == 2 ) { +// operationChains.get("segment_speed").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// operationChains.get("segment_cnt").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// } else if (app == 3) { +// operationChains.get("goods").threadOCsMap.get(context.thisThreadId).holder_v1.clear(); +// } // threadToOCs.get(context.thisThreadId).clear(); // for (OperationChain oc : threadToOCs.get(context.thisThreadId)) { // oc.clear(); // } // this.setOCs(context); for (OperationChain oc : threadToOCs.get(context.thisThreadId)) { - oc.clear(); + oc.clear(); // only need to clear all operations from all ocs } } diff --git a/state-engine/src/main/java/scheduler/struct/op/TaskPrecedenceGraph.java b/state-engine/src/main/java/scheduler/struct/op/TaskPrecedenceGraph.java index f0d50cc8e..c0afbde3b 100644 --- a/state-engine/src/main/java/scheduler/struct/op/TaskPrecedenceGraph.java +++ b/state-engine/src/main/java/scheduler/struct/op/TaskPrecedenceGraph.java @@ -60,7 +60,7 @@ public void reset(Context context) { // } // this.setOCs(context); // TODO: the short cut should be reset, but will take some time. for (OperationChain oc : threadToOCs.get(context.thisThreadId)) { - oc.clear(); + oc.clear(); // only need to clear all operations from all ocs } }