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

RS: refactor append to user course node log

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 15.0
    • Fix Version/s: 15.0
    • Component/s: Course
    • Labels:
      None

      Description

      Use a specific update statement to concat new piece of log to the course node log. This will by pass the optimistic locking on o_property and prevent part of the red screens produce by the enrolment course element under load.

      2020-03-13 17:00:09.271 [ajp-nio2-8008-exec-43] ERROR OLATRuntimeException ^%^ I817427-J110976 ^%^ org.olat.core.logging.OLATRuntimeException
      https://olat.xyz.ch/auth/RepositoryEntry/384860282/CourseNode/93728385769068
      Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
      
      **RedScreen** Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.olat.properties.Property#429524342]
      
      <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:5, 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>
      
      Caused by: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.olat.properties.Property#429524342]
      at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:223)
      at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:93)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1539)
      at org.hibernate.query.Query.getResultList(Query.java:165)
      at org.olat.properties.PropertyManager.findProperties(PropertyManager.java:503)
      at org.olat.properties.PropertyManager.findProperties(PropertyManager.java:441)
      at org.olat.properties.PropertyManager.findProperty(PropertyManager.java:594)
      at org.olat.properties.NarrowedPropertyManager.findProperty(NarrowedPropertyManager.java:150)
      at org.olat.course.properties.PersistingCoursePropertyManager.findCourseNodeProperty(PersistingCoursePropertyManager.java:150)
      at org.olat.course.auditing.UserNodeAuditManagerImpl.appendToUserNodeLog(UserNodeAuditManagerImpl.java:65)
      at org.olat.course.assessment.manager.CourseAssessmentManagerImpl.saveScoreEvaluation(CourseAssessmentManagerImpl.java:544)
      at org.olat.course.assessment.manager.CourseAssessmentServiceImpl.updateScoreEvaluation(CourseAssessmentServiceImpl.java:178)
      at org.olat.course.nodes.en.EnrollmentManager.syncAssessmentStatus(EnrollmentManager.java:537)
      at org.olat.course.nodes.en.EnrollmentManager.doEnroll(EnrollmentManager.java:162)
      at org.olat.course.nodes.en.ENRunController.event(ENRunController.java:220)
      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) ... 39 more Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.olat.properties.Property#429524342]
      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.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:57)
      at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102)
      at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1317)
      at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1397)
      at org.hibernate.query.internal.AbstractProducedQuery.doList(AbstractProducedQuery.java:1562)
      at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1530)
      ... 64 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: