submitJob 提交写作业报错 RefId:S00002

请问为什么对每个日期做循环使用submitJob的时候,会报错<ChunkInTransaction>filepath '201904M/Key0/aJmPO' has been owned by transaction 158592660 RefId:S00002。只有这一个异步作业,30个股票分区。日期是用月份分区的。

代码脚本如下:

DateList = getMarketCalendar("XSHE",2015.01.01, today())
def cal_threshold(keyword_date){
order_threshold=loadTable('dfs://daily', 'order_threshold')
   ***
    append!(order_threshold, threshold)
    print(keyword_date + " is completed!")
}
for(keyword_date in DateList){
    //cal_threshold(keyword_date)
    jobId = "threshold_"+ strReplace(keyword_date$STRING, ".", "")        
    jobDesc = "cal_threshold"
    submitJob(jobId, jobDesc, cal_threshold, keyword_date)
}
请先 登录 后评论

1 个回答

veryOrdinary

因为分区是按月,而写入任务是按天提交的,所以可能造成一个分区同时有多个写入任务在写入,所以造成了同一分区的写入冲突。

详细可以参考 https://docs.dolphindb.cn/zh/help/200/ErrorCodeList/S00002/index.html

请先 登录 后评论