Skip to content

Commit

Permalink
bugfix for multi puncutation (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
yancanmao authored Mar 31, 2022
1 parent 0fa57ee commit ea8b3bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ public class TaskPrecedenceGraph<Context extends OGSchedulerContext> {
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
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit ea8b3bb

Please sign in to comment.