阅读:334 回复:2
TAn
TAn
46

帖子

688

跟帖

4525

积分

H3 BPM互助团队
H3 BPM互助团队
  • 社区居民

[BUG反馈].Net 9.2.7救命!错误日期OT_Token插入ObjectID重复导致流程终止

楼主#
更多 发布于:2020-01-13 10:44
.Net 9.2.7
最近查看日志出现多个如下错误
DefaultEngine: InstanceManager.SaveInstance.Exception->InstanceId=5a51001f-5476-41a4-9e8a-75b56bfc17bb,Message=System.Exception: RuntimeManager.SaveContext.Exception->InstanceId=5a51001f-5476-41a4-9e8a-75b56bfc17bb,Message=System.Exception: INSERT INTO OT_Token(ObjectID, [TokenId], [Activity], [Approval], [SkippedExecution], [Exceptional], [Retrievable], [CreatedTime], [PreTokens], [FinishedTime], [State], [Participants], [UsedTime], [UsedTime_W], [UsedTime_C], [UsedTime_O], [UsedTimeRate], [ParentObjectID], [ParentPropertyName], [ParentIndex]) VALUES ('6742b5e0-4bbf-4bbb-8e51-d682a3a08e50', @TokenId, @Activity, @Approval, @SkippedExecution, @Exceptional, @Retrievable, @CreatedTime, @PreTokens, @FinishedTime, @State, null, @UsedTime, @UsedTime_W, @UsedTime_C, @UsedTime_O, @UsedTimeRate, @ParentObjectID, @ParentPropertyName, @ParentIndex) ---> System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__OT_Token__9A6192B1B38B3D1C'. Cannot insert duplicate key in object 'dbo.OT_Token'. The duplicate key value is (6742b5e0-4bbf-4bbb-8e51-d682a3a08e50).
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at OThinker.Data.Database.CommandExecutor.ExecuteNonQuery(ExecutionContext[] Executions)
   --- End of inner exception stack trace ---
   at OThinker.Data.Database.CommandExecutor.ExecuteNonQuery(ExecutionContext[] Executions)
   at OThinker.Data.Database.Serialization.Serializer.Update(ICommand Command, ISerializable[] Objects)
   at OThinker.H3.Instance.RuntimeManager.SaveContext(String InstanceId)
   at OThinker.H3.Instance.RuntimeManager.SaveContext(String InstanceId)
   at OThinker.H3.Instance.InstanceManager.SaveInstance(String InstanceId)



部分会导致流程不会流向下一个节点,部分流程又正常,OT_token表大概有80多W条数据。
我检查了多个错误,发现大部分ObjectID重复的是该流程的某一个OT_token的ObjectID,都是跟同流程下的冲突,不像是产生uuid的时候导致的重复。
看了代码,数据保存时ObjectID应该是通过GenerateObjectID函数产生的,并不是从哪插入的,很奇怪。

@武汉技术支持团队 救命!!!
实名用户_a13aa093
25

帖子

47

跟帖

668

积分

黄金榴莲
黄金榴莲
1楼#
发布于:2020-01-16 07:56
没人了,散了?
果冻栋吖
105

帖子

756

跟帖

2523

积分

论坛版主
论坛版主
  • 社区居民
  • 忠实会员
  • 优秀斑竹
2楼#
发布于:2020-02-10 08:37
基本废了
需要技术支持请私信~
游客

返回顶部