Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-4576

RS: Remove optimistic locking on the user efficiency statement

    XMLWordPrintable

    Details

      Description

      Remove the optimistic locking, last commit win. This will prevent part of the red screens produce by the enrolment course element under heavy load.

      2020-03-13 17:00:38.586 [ajp-nio2-8008-exec-62] ERROR DBRuntimeException ^%^ I818401-J111270
      org.olat.core.logging.DBRuntimeException
      https://olat.xyz.ch/auth/RepositoryEntry/384860282/CourseNode/93728385769068
       Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15
       **RedScreen** commit failed, rollback transaction
       
       <dispatchinfo>
       	<componentinfo>
       		<compname>table</compname>
       		<compclass>org.olat.core.gui.components.table.Table</compclass>
       		<extendedinfo>n/a</extendedinfo> <event>
       		<class&gt;org.olat.core.gui.components.table.TableEvent</class&gt;
       		<command>r</command>
       		<tostring>cmd:r, rowId:7, actionId:cmd.enroll.in.group</tostring> </event>
       	</componentinfo>
       	<controllerinfo>
       	<controllername>org.olat.core.gui.components.table.TableController</controllername>
       	<controllername>org.olat.course.nodes.en.ENRunController</controllername>
       	<controllername>org.olat.course.run.RunMainController</controllername>
       	<controllername>org.olat.course.run.CourseRuntimeController</controllername>
       	<controllername>org.olat.core.commons.fullWebApp.BaseFullWebappController</controllername>
       	</controllerinfo>
       </dispatchinfo>
      
      org.olat.core.logging.DBRuntimeException: commit failed, rollback transaction
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:573)
      at org.olat.course.assessment.manager.CourseAssessmentManagerImpl.updateLastVisited(CourseAssessmentManagerImpl.java:401)
      at org.olat.course.assessment.manager.CourseAssessmentServiceImpl.onNodeVisited(CourseAssessmentServiceImpl.java:378)
      at org.olat.course.run.navigation.NavigationHandler.doEvaluateJumpTo(NavigationHandler.java:445)
      at org.olat.course.run.navigation.NavigationHandler.evaluateJumpToCourseNode(NavigationHandler.java:129)
      at org.olat.course.run.RunMainController.updateTreeAndContent(RunMainController.java:453)
      at org.olat.course.run.RunMainController.updateCurrentCourseNode(RunMainController.java:429)
      at org.olat.course.run.CourseRuntimeController.onSecurityReloaded(CourseRuntimeController.java:294)
      at org.olat.repository.ui.RepositoryEntryRuntimeController.reloadSecurity(RepositoryEntryRuntimeController.java:286)
      at org.olat.course.run.CourseRuntimeController.processBusinessGroupModifiedEvent(CourseRuntimeController.java:2220)
      at org.olat.course.run.CourseRuntimeController.event(CourseRuntimeController.java:1090)
      at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
      at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
      at org.olat.course.run.RunMainController.event(RunMainController.java:708)
      at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
      at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
      at org.olat.core.gui.control.generic.title.TitledWrapperController.event(TitledWrapperController.java:180)
      at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
      at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
      at org.olat.course.nodes.en.ENRunController.event(ENRunController.java:234)
      at org.olat.core.gui.control.DefaultController$1.run(DefaultController.java:250)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:247)
      at org.olat.core.gui.control.DefaultController.fireEvent(DefaultController.java:194)
      at org.olat.core.gui.components.table.TableController.event(TableController.java:303)
      at org.olat.core.gui.control.DefaultController.dispatchEvent(DefaultController.java:206)
      at org.olat.core.gui.components.AbstractComponent$1.run(AbstractComponent.java:240)
      at org.olat.core.logging.activity.ThreadLocalUserActivityLoggerInstaller.runWithUserActivityLogger(ThreadLocalUserActivityLoggerInstaller.java:108)
      at org.olat.core.gui.components.AbstractComponent.fireEvent(AbstractComponent.java:238)
      at org.olat.core.gui.components.table.Table.doDispatchRequest(Table.java:352)
      at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
      at org.olat.core.gui.components.Window.doDispatchToComponent(Window.java:1218)
      at org.olat.core.gui.components.Window.dispatchRequest(Window.java:400)
      at org.olat.core.gui.components.Window.doDispatchRequest(Window.java:284)
      at org.olat.core.gui.components.AbstractComponent.dispatchRequest(AbstractComponent.java:193)
      at org.olat.dispatcher.AuthenticatedDispatcher.processValidDispatchURI(AuthenticatedDispatcher.java:263)
      at org.olat.dispatcher.AuthenticatedDispatcher.execute(AuthenticatedDispatcher.java:184)
      at org.olat.core.servlets.OpenOLATServlet.executeUserRequest(OpenOLATServlet.java:269)
      at org.olat.core.servlets.OpenOLATServlet.doPost(OpenOLATServlet.java:216)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
      at org.olat.core.servlets.OpenOLATServlet.service(OpenOLATServlet.java:160)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.olat.core.servlets.HeadersFilter.doFilter(HeadersFilter.java:95)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
      at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1699) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1050)
      at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:630)
      at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:608)
      at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
      at sun.nio.ch.Invoker$2.run(Invoker.java:218)
      at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:748)
      
      Caused by: javax.persistence.RollbackException: Error while committing the transaction
      at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:81)
      at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:104)
      at org.olat.core.commons.persistence.DBImpl.commit(DBImpl.java:530)
      ... 77 more Caused by: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.olat.course.assessment.model.UserEfficiencyStatementImpl#430014976]
      at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:223)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:93)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
      at org.hibernate.internal.ExceptionConverterImpl.convertCommitException(ExceptionConverterImpl.java:65)
      ... 79 more Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.olat.course.assessment.model.UserEfficiencyStatementImpl#430014976]
      at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2585)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3429)
      at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3292)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3704)
      at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:201)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
      at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
      at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
      at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
      at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:348)
      at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
      at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102)
      at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1352)
      at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:443)
      at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3202) at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2370)
      at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:447)
      at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183)
      at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40)
      at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281)
      at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ... 78 more
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            srosse Stéphane Rossé
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: