调度事务变更异常

This commit is contained in:
Himit_ZH 2021-11-25 12:37:50 +08:00
parent 36c6d9e67b
commit 18ee1b9077
3 changed files with 30 additions and 30 deletions

View File

@ -50,7 +50,7 @@ public class ChooseUtils {
* @Return
* @Since 2021/4/15
*/
@Transactional
@Transactional(rollbackFor = Exception.class)
public JudgeServer chooseServer(Boolean isRemote) {
// 获取该微服务的所有健康实例
List<Instance> instances = getInstances(JudgeServiceName);
@ -94,7 +94,7 @@ public class ChooseUtils {
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public JudgeServer chooseFixedServer(Boolean isRemote, String fixedTag, Integer index, Integer total) {
// 获取该微服务的所有健康实例
List<Instance> instances = getInstances(JudgeServiceName);
@ -159,7 +159,7 @@ public class ChooseUtils {
}
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public RemoteJudgeAccount chooseRemoteAccount(String remoteOJAccountType, String username, Boolean isNeedAccountRejudge) {
// 过滤出当前远程oj可用的账号列表 悲观锁
@ -185,7 +185,7 @@ public class ChooseUtils {
return null;
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public HashMap<String, Object> chooseFixedAccount(String remoteOJAccountType) {
List<Instance> instances = getInstances(JudgeServiceName);
// 过滤出当前远程可用的账号列表 悲观锁

View File

@ -548,7 +548,6 @@ public class JudgeRun {
String testCaseOutputFilePath,
Long maxTime,
Long maxMemory,
Long maxOutputSize,
Integer maxStack,
String userExeName,
String spjExeName,
@ -570,7 +569,6 @@ public class JudgeRun {
testCaseInputFilePath,
testCaseInputFileName,
maxTime,
maxOutputSize,
maxStack,
parseRunCommand(spjRunConfig.getCommand(), spjRunConfig, testCaseInputFileName, null, testCaseOutputFileName),
spjRunConfig.getEnvs(),

View File

@ -293,15 +293,15 @@ public class SandboxRun {
public static JSONArray spjCheckResult(List<String> args,
List<String> envs,
String userOutputFilePath,
String userOutputFileName,
String testCaseInputFilePath,
String testCaseInputFileName,
String testCaseOutputFilePath,
String testCaseOutputFileName,
String spjExeSrc,
String spjExeName) throws SystemError {
List<String> envs,
String userOutputFilePath,
String userOutputFileName,
String testCaseInputFilePath,
String testCaseInputFileName,
String testCaseOutputFilePath,
String testCaseOutputFileName,
String spjExeSrc,
String spjExeName) throws SystemError {
JSONObject cmd = new JSONObject();
cmd.set("args", args);
cmd.set("env", envs);
@ -371,20 +371,19 @@ public class SandboxRun {
交互跑题 暂时不启用
*/
public static JSONArray interactTestCase(List<String> args,
List<String> envs,
String userExeName,
String userFileId,
String testCaseInputPath,
String testCaseInputFileName,
Long maxTime,
Long maxOutputSize,
Integer maxStack,
List<String> spjArgs,
List<String> spjEnvs,
String spjExeSrc,
String testCaseOutputFilePath,
String testCaseOutputFileName,
String spjExeName) throws SystemError {
List<String> envs,
String userExeName,
String userFileId,
String testCaseInputPath,
String testCaseInputFileName,
Long maxTime,
Integer maxStack,
List<String> spjArgs,
List<String> spjEnvs,
String spjExeSrc,
String testCaseOutputFilePath,
String testCaseOutputFileName,
String spjExeName) throws SystemError {
/**
* 注意用户源代码需要先编译若是通过编译需要先将文件存入内存再利用管道判题同时特殊判题程序必须已编译且存在否则判题失败系统错误
@ -485,11 +484,14 @@ public class SandboxRun {
JSONObject in = new JSONObject();
in.set("index", 0);
in.set("fd", 1);
in.set("max", maxOutputSize);
in.set("proxy", true);
in.set("max", 32 * 1024 * 1024);
JSONObject out = new JSONObject();
out.set("index", 1);
out.set("fd", 0);
out.set("proxy", true);
out.set("max", 32 * 1024 * 1024);
JSONObject pipe = new JSONObject();
pipe.set("in", in);