[BugFix:
Remove task-context before run task. One sync queue with
several tasks is served by one thread, so those tasks share
same task-context which is not supposed.
@@ -13,6 +13,7 @@ import org.zstack.header.core.progress.ChainInfo;
import org.zstack.header.core.progress.PendingTaskInfo;
import org.zstack.header.errorcode.OperationFailureException;
import org.zstack.utils.DebugUtils;
+import org.zstack.utils.TaskContext;
import org.zstack.utils.Utils;
import org.zstack.utils.gson.JSONObjectUtil;
import org.zstack.utils.logging.CLogger;
@@ -284,6 +285,7 @@ class DispatchQueueImpl implements DispatchQueue, DebugSignalHandler {
}
try {
+ TaskContext.removeTaskContext();
getTask().run(() -> {
try {
done();
