You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2019/01/18 12:56:08 UTC

[GitHub] airbaby opened a new issue #382: OptimisticLockException lead to Alpha Server normal service stop

airbaby opened a new issue #382: OptimisticLockException  lead to Alpha Server  normal service stop
URL: https://github.com/apache/servicecomb-pack/issues/382
 
 
   ![1547815486 1](https://user-images.githubusercontent.com/17855411/51388085-60210600-1b63-11e9-9fd6-855924bc930e.png)
   ![1547815537 1](https://user-images.githubusercontent.com/17855411/51388095-68794100-1b63-11e9-832b-443c7a0a943e.png)
   
   19:19:07.755 [pool-2-thread-1] INFO  org.apache.servicecomb.pack.alpha.core.EventScanner - Found timeout event TxEvent{surrogateId=2019, serviceName='ecf.order', instanceId='ecf.order-10.73.33.38', creationTime=Fri Jan 18 19:19:07 CST 2019, globalTxId='e219b627-6ffc-483c-ae79-436033a521b7', localTxId='e219b627-6ffc-483c-ae79-436033a521b7', parentTxId='null', type='SagaStartedEvent', compensationMethod='', expiryTime=Fri Jan 18 19:19:17 CST 2019, retryMethod='', retries=0}
   19:19:07.787 [pool-2-thread-1] WARN  org.eclipse.persistence.session./file:/apps/svr/servicecmomb/top/alpha-server-0.3.0-exec2.jar_default - 
   org.eclipse.persistence.exceptions.OptimisticLockException: 
   Exception Description: The object [TxTimeout{eventId=2019, serviceName='ecf.order', instanceId='ecf.order-10.73.33.38', globalTxId='e219b627-6ffc-483c-ae79-436033a521b7', localTxId='e219b627-6ffc-483c-ae79-436033a521b7', parentTxId='null', type='SagaStartedEvent', expiryTime=Thu Jan 17 15:19:17 CST 2019, status=NEW}] cannot be updated because it has changed or been deleted since it was last read. 
   Class> org.apache.servicecomb.pack.alpha.core.TxTimeout Primary Key> 179
   	at org.eclipse.persistence.exceptions.OptimisticLockException.objectChangedSinceLastReadWhenUpdating(OptimisticLockException.java:144) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.descriptors.VersionLockingPolicy.validateUpdate(VersionLockingPolicy.java:790) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1099) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:314) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:911) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:810) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2979) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1892) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1874) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1824) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:273) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:131) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:4384) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1491) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1637) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:455) ~[org.eclipse.persistence.core-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:967) ~[org.eclipse.persistence.jpa-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.jpa.QueryImpl.performPreQueryFlush(QueryImpl.java:974) ~[org.eclipse.persistence.jpa-2.7.1.jar!/:?]
   	at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:298) ~[org.eclipse.persistence.jpa-2.7.1.jar!/:?]
   	at org.springframework.data.jpa.repository.query.JpaQueryExecution$ModifyingExecution.doExecute(JpaQueryExecution.java:256) ~[spring-data-jpa-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:91) ~[spring-data-jpa-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:136) ~[spring-data-jpa-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:125) ~[spring-data-jpa-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:605) ~[spring-data-commons-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135) ~[spring-data-jpa-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.apache.servicecomb.pack.alpha.server.$Proxy131.updateStatusByGlobalTxIdAndLocalTxId(Unknown Source) ~[?:0.3.0]
   	at org.apache.servicecomb.pack.alpha.server.SpringTxTimeoutRepository.lambda$findFirstTimeout$11(SpringTxTimeoutRepository.java:68) ~[classes!/:0.3.0]
   	at java.util.Vector.forEach(Vector.java:1275) ~[?:1.8.0_171]
   	at org.apache.servicecomb.pack.alpha.server.SpringTxTimeoutRepository.findFirstTimeout(SpringTxTimeoutRepository.java:67) ~[classes!/:0.3.0]
   	at org.apache.servicecomb.pack.alpha.server.SpringTxTimeoutRepository$$FastClassBySpringCGLIB$$dda60806.invoke(<generated>) ~[classes!/:0.3.0]
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:749) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688) ~[spring-aop-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
   	at org.apache.servicecomb.pack.alpha.server.SpringTxTimeoutRepository$$EnhancerBySpringCGLIB$$221abfe3.findFirstTimeout(<generated>) ~[classes!/:0.3.0]
   	at org.apache.servicecomb.pack.alpha.core.EventScanner.abortTimeoutEvents(EventScanner.java:147) ~[alpha-core-0.3.0.jar!/:0.3.0]
   	at org.apache.servicecomb.pack.alpha.core.EventScanner.lambda$pollEvents$1(EventScanner.java:82) ~[alpha-core-0.3.0.jar!/:0.3.0]
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_171]
   	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_171]
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_171]
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_171]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171]
   	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
   19:19:08.618 [grpc-default-executor-1] INFO  org.apache.servicecomb.pack.alpha.core.TxConsistentService - Transaction event TxStartedEvent rejected, because its parent with globalTxId e219b627-6ffc-483c-ae79-436033a521b7 was already aborted
   19:46:37.196 [pool-5-thread-1] WARN  com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@1469404f (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
   19:46:37.198 [pool-5-thread-1] WARN  com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@1aaebcb2 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
   19:46:37.199 [pool-5-thread-1] WARN  com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@1e912b3f (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
   19:46:37.200 [pool-5-thread-1] WARN  com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@5b93b689 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services