Hakunata edited a comment on issue #733:
URL:
https://github.com/apache/servicecomb-pack/issues/733#issuecomment-1049398054
> 建议查看一下日志,看看prepare这块有没有异常的捕获。
```
org.springframework.transaction.TransactionSystemException: Could not commit
JPA transaction; nested exception is javax.persistence.RollbackException:
Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.7.1.v20171221-bd47e8f): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLIntegrityConstraintViolationException:
Duplicate entry
'be2bdf3f-f421-4292-9234-ef2d57e7bfa4-be2bdf3f-f421-4292-9234-ef2' for key
'tcc_global_tx_event_index'
Error Code: 1062
Call: INSERT INTO tcc_global_tx_event (CREATIONTIME, GLOBALTXID, INSTANCEID,
LASTMODIFIED, LOCALTXID, PARENTTXID, SERVICENAME, STATUS, TXTYPE) VALUES (?, ?,
?, ?, ?, ?, ?, ?, ?)
bind => [9 parameters bound]
Query: InsertObjectQuery(GlobalTxEvent{surrogateId=null,
globalTxId='be2bdf3f-f421-4292-9234-ef2d57e7bfa4',
localTxId='be2bdf3f-f421-4292-9234-ef2d57e7bfa4', parentTxId='',
serviceName='bussiness', instanceId='bussiness-127.0.0.1',
txType='END_TIMEOUT', status='Failed', creationTime=Thu Feb 24 09:18:14 CST
2022, lastModified=Thu Feb 24 09:18:14 CST 2022})
at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:541)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:746)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:714)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:534)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:305)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.RDBTxEventRepository$$EnhancerBySpringCGLIB$$7b4be68d.saveGlobalTxEvent(<generated>)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.TccTxEventService.onTccEndedEvent(TccTxEventService.java:108)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.TccTxEventService.lambda$null$0(TccTxEventService.java:144)
at java.util.Vector.forEach(Vector.java:1275)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.TccTxEventService.lambda$handleTimeoutTx$1(TccTxEventService.java:135)
at java.util.Optional.ifPresent(Optional.java:159)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.TccTxEventService.handleTimeoutTx(TccTxEventService.java:135)
at
org.apache.servicecomb.pack.alpha.server.tcc.service.TccEventScanner.lambda$start$0(TccEventScanner.java:50)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.7.1.v20171221-bd47e8f):
org.eclipse.persistence.exceptions.DatabaseException
```
放置一会不操作,还会出现这种数据库错误
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]