There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-051e523b-e5ba-40ce-a7fe-f198c61a3185 XWIKI-22421 Open

XWikiHibernateBaseStore related error when editing in realtime

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-0188d5f2-9733-40cb-81db-c26f0adbcd6b Dorian Ouakli on 20/Aug/24 16:33
 

Realtime would higlight a race condition in the edit lock release. I do not think this is specific to realtime either.
Maybe it has something to do with forcing locks?
I got a similar traceback by running the realtime docker tests.

2024-08-20 12:28:22,649 [CommonsExecStreamPumper-pool-370-thread-1] - 2024-08-20 12:28:22,649 [qtp275310919-31 - http://xwiki-alias:8080/xwiki/bin/cancel/NestedRealtimeWYSIWYGEditorIT/reloadEditorsSilentMergeConflictManualSave/?ajax=1&a
ction=edit&] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Warning Code: -1100, SQLState: 02000                                                                                                                                                
2024-08-20 12:28:22,649 [CommonsExecStreamPumper-pool-370-thread-1] - 2024-08-20 12:28:22,649 [qtp275310919-31 - http://xwiki-alias:8080/xwiki/bin/cancel/NestedRealtimeWYSIWYGEditorIT/reloadEditorsSilentMergeConflictManualSave/?ajax=1&a
ction=edit&] WARN  o.h.e.j.s.SqlExceptionHelper   - no data   
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] - 2024-08-20 12:28:22,649 [qtp275310919-31 - http://xwiki-alias:8080/xwiki/bin/cancel/NestedRealtimeWYSIWYGEditorIT/reloadEditorsSilentMergeConflictManualSave/?ajax=1&a
ction=edit&] ERROR .x.x.s.XWikiHibernateBaseStore - Exception while close transaction  
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] - javax.persistence.OptimisticLockException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: delete fr
om xwikilock where XWL_DOC_ID=? 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.ExceptionConverterImpl.wrapStaleStateException(ExceptionConverterImpl.java:238) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:93) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1411) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:489) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3303) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2438) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:449) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordin
atorImpl.java:183) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:
40) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransac
tionCoordinatorImpl.java:281) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.internal.store.hibernate.HibernateStore.endTransaction(HibernateStore.java:940) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:840) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:948) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.store.XWikiHibernateStore.deleteLock(XWikiHibernateStore.java:2042) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.store.XWikiCacheStore.deleteLock(XWikiCacheStore.java:651) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.doc.XWikiDocument.removeLock(XWikiDocument.java:7359) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.web.CancelAction.action(CancelAction.java:70) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:636) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:108) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1151) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHolder.handle(ServletHolder.java:640) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1374) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:177) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:175) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.FilterHolder.doFilter(FilterHolder.java:171) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1348) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler.doHandle(ServletHandler.java:454) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.handle(ScopedHandler.java:119)
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.security.SecurityHandler.handle(SecurityHandler.java:497)                                                                                  
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.HandlerWrapper.handle(HandlerWrapper.java:108)                                                                                      
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.nextHandle(ScopedHandler.java:183) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.SessionHandler.doHandle(SessionHandler.java:516)                                                                                    
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.nextHandle(ScopedHandler.java:181) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ContextHandler.doHandle(ContextHandler.java:878)                                                                                    
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.nextScope(ScopedHandler.java:152) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.servlet.ServletHandler.doScope(ServletHandler.java:423)                          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.nextScope(ScopedHandler.java:150)          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.SessionHandler.doScope(SessionHandler.java:500)           
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.nextScope(ScopedHandler.java:150)           
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ContextHandler.doScope(ContextHandler.java:823) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ScopedHandler.handle(ScopedHandler.java:117) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ContextHandler.handle(ContextHandler.java:1421)               
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1294) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.HttpChannel.dispatch(HttpChannel.java:624)                                          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.HttpChannel.handle(HttpChannel.java:456)                                                                                            
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.ee8.nested.ContextHandler$CoreContextHandler$CoreToNestedHandler.handle(ContextHandler.java:2365) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1060)                                                                                 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:181) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.server.Server.handle(Server.java:181)                                                                                                          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.server.internal.HttpChannelState$HandlerInvoker.run(HttpChannelState.java:648) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:403)       
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)   
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)                      
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)    
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:478) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:441) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:293) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:201) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:311) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:979) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1209) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1164) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at java.base/java.lang.Thread.run(Thread.java:840)                                       
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] - Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: delete
 from xwikilock where XWL_DOC_ID=?                                                                                                                                                                                                          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:47) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3698) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3987) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:123) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)                              
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)                     
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:344) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40) 
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:107)  
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1407)          
2024-08-20 12:28:22,650 [CommonsExecStreamPumper-pool-370-thread-1] -   ... 80 common frames omitted