Enterprise 3.x
  1. Enterprise 3.x
  2. ETHREEOH-3170

DB errors on MSSQL with Snapshot Isolation enabled while CIFS copying

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1 SP2
    • Fix Version/s: 3.1 SP2
    • Component/s: Repository
    • Security Level: external (External user)
    • Labels:
      None
    • Environment:
      MSSQL 2005 with SI enabled
    • Regression:
      Regression

      Description

      We have the following DB errors on MSSQL in the case of Snapshot Isolation using.
      Error occurs on batch copying (50 files in 4 folder is enough).
      Here is an example stackstrace.
      If we have <disableNIO/>, then errors appear faster, right in a few seconds.

      17:10:08,496 ERROR [org.alfresco.fileserver] Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.alfresco.repo.domain.hibernate.ChildAssocImpl]
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2163)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2643)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:51)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:322)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
      17:10:08,496 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:10:08,496 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:10:08,496 ERROR [org.alfresco.fileserver] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:10:08,496 ERROR [org.alfresco.fileserver] at java.lang.reflect.Method.invoke(Method.java:597)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.springframework.orm.hibernate3.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1202)
      17:10:08,496 ERROR [org.alfresco.fileserver] at $Proxy77.save(Unknown Source)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl$12.doInHibernate(HibernateNodeDaoServiceImpl.java:1931)
      17:10:08,496 ERROR [org.alfresco.fileserver] at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
      17:10:08,511 ERROR [org.alfresco.fileserver] at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
      17:10:08,527 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.writeChildAssocChanges(HibernateNodeDaoServiceImpl.java:1871)
      17:10:08,527 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl.newChildAssoc(HibernateNodeDaoServiceImpl.java:1934)
      17:10:08,527 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:10:08,527 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:10:08,527 ERROR [org.alfresco.fileserver] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:10:08,527 ERROR [org.alfresco.fileserver] at java.lang.reflect.Method.invoke(Method.java:597)
      17:10:08,527 ERROR [org.alfresco.fileserver] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.transaction.TransactionalDaoInterceptor.invoke(TransactionalDaoInterceptor.java:68)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor.invoke(DirtySessionMethodInterceptor.java:381)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invokeInternal(SingleEntryTransactionResourceInterceptor.java:163)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invoke(SingleEntryTransactionResourceInterceptor.java:138)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      17:10:08,543 ERROR [org.alfresco.fileserver] at $Proxy12.newChildAssoc(Unknown Source)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.db.DbNodeServiceImpl.createNode(DbNodeServiceImpl.java:319)
      17:10:08,543 ERROR [org.alfresco.fileserver] at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source)
      17:10:08,543 ERROR [org.alfresco.fileserver] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:10:08,543 ERROR [org.alfresco.fileserver] at java.lang.reflect.Method.invoke(Method.java:597)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110)
      17:10:08,543 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      17:10:08,558 ERROR [org.alfresco.fileserver] at $Proxy17.createNode(Unknown Source)
      17:10:08,558 ERROR [org.alfresco.fileserver] at sun.reflect.GeneratedMethodAccessor431.invoke(Unknown Source)
      17:10:08,558 ERROR [org.alfresco.fileserver] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:10:08,558 ERROR [org.alfresco.fileserver] at java.lang.reflect.Method.invoke(Method.java:597)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221)
      17:10:08,558 ERROR [org.alfresco.fileserver] at $Proxy18.createNode(Unknown Source)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:279)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:188)
      17:10:08,558 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:188)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      17:10:08,574 ERROR [org.alfresco.fileserver] at $Proxy17.createNode(Unknown Source)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.createImpl(FileFolderServiceImpl.java:789)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.model.filefolder.FileFolderServiceImpl.create(FileFolderServiceImpl.java:747)
      17:10:08,574 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      17:10:08,574 ERROR [org.alfresco.fileserver] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      17:10:08,574 ERROR [org.alfresco.fileserver] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      17:10:08,574 ERROR [org.alfresco.fileserver] at java.lang.reflect.Method.invoke(Method.java:597)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.model.filefolder.TempFileMarkerInterceptor.invoke(TempFileMarkerInterceptor.java:83)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:131)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.model.filefolder.MLTranslationInterceptor.invoke(MLTranslationInterceptor.java:211)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      17:10:08,574 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      17:10:08,589 ERROR [org.alfresco.fileserver] at $Proxy63.create(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.filesys.repo.CifsHelper.createNode(CifsHelper.java:367)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.filesys.repo.ContentDiskDriver.createFile(ContentDiskDriver.java:1738)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.NTProtocolHandler.procNTCreateAndX(NTProtocolHandler.java:5575)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.NTProtocolHandler.runProtocol(NTProtocolHandler.java:306)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.SMBSrvSession.runHandler(SMBSrvSession.java:1375)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.SMBSrvSession.processPacket(SMBSrvSession.java:1467)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.smb.server.CIFSThreadRequest.runRequest(CIFSThreadRequest.java:57)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.alfresco.jlan.server.thread.ThreadRequestPool$ThreadWorker.run(ThreadRequestPool.java:141)
      17:10:08,589 ERROR [org.alfresco.fileserver] at java.lang.Thread.run(Thread.java:619)
      17:10:08,589 ERROR [org.alfresco.fileserver] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.alf_node' directly or indirectly in database 'alf31b362' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
      17:10:08,589 ERROR [org.alfresco.fileserver] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
      17:10:08,589 ERROR [org.alfresco.fileserver] ... 101 more


      AntonRy

        Activity

        Hide
        Alfresco QA Team added a comment -
        Found in Alfresco 3.1.2 EE build 362 using Windows 2008 SP1 x64, JBoss 4.2.3, MSSQL 2005 SP2, JDK 6u16 x64.
        Show
        Alfresco QA Team added a comment - Found in Alfresco 3.1.2 EE build 362 using Windows 2008 SP1 x64, JBoss 4.2.3, MSSQL 2005 SP2, JDK 6u16 x64.
        Hide
        Steve Rigby added a comment -
        required for 3.1 sp2
        Show
        Steve Rigby added a comment - required for 3.1 sp2
        Hide
        Steve Rigby added a comment -
        For retest in b378 or later
        Show
        Steve Rigby added a comment - For retest in b378 or later
        Hide
        Alfresco QA Team added a comment -
        Successfully validated in Alfresco 3.1.2 EE build 378 using Windows 2008 SP1 x64, Tomcat 6.0.18, MSSQL 2005 SP2, JDK 6u16 x64.
        Show
        Alfresco QA Team added a comment - Successfully validated in Alfresco 3.1.2 EE build 378 using Windows 2008 SP1 x64, Tomcat 6.0.18, MSSQL 2005 SP2, JDK 6u16 x64.

          People

          • Assignee:
            Closed Bugs
            Reporter:
            Alfresco QA Team
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: