You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Index metadata is kept in the database. It seems to be possible that situations could occur when the system tries to add a second index metadata entry for a project.
To Reproduce
Not sure. Looks like a race condition.
Expected behavior
Only a single index metadata item for a project should ever be added to a DB. If one already exists, no other one should be added.
Screenshots
2024-08-13 23:07:29 ERROR [inception-worker-1] [SYSTEM] SqlExceptionHelper - (conn=104) Duplicate entry '144' for key 'UK_index_project'
2024-08-13 23:07:29 ERROR [inception-worker-1] [SYSTEM] Task - Task [Rebuilding index...] failed (trigger: [onLayerConfigurationChanged])
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:762) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:742) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final]
at jdk.internal.reflect.GeneratedMethodAccessor292.invoke(Unknown Source) ~[?:?]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:316) ~[spring-orm-5.3.37.jar:5.3.37]
at jdk.proxy2/jdk.proxy2.$Proxy193.persist(Unknown Source) ~[?:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.loadIndex(SearchServiceImpl.java:264) ~[classes/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.acquireIndex(SearchServiceImpl.java:373) ~[classes/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.reindex(SearchServiceImpl.java:651) ~[classes/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl$$FastClassBySpringCGLIB$$d6146f50.invoke(<generated>) ~[classes/:?]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:792) ~[spring-aop-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) ~[spring-aop-5.3.37.jar:5.3.37]
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-5.3.37.jar:5.3.37]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388) ~[spring-tx-5.3.37.jar:5.3.37]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:762) ~[spring-aop-5.3.37.jar:5.3.37]
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:707) ~[spring-aop-5.3.37.jar:5.3.37]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl$$EnhancerBySpringCGLIB$$4fefb718.reindex(<generated>) ~[classes/:?]
at de.tudarmstadt.ukp.inception.search.scheduling.tasks.ReindexTask.execute(ReindexTask.java:71) ~[classes/:?]
at de.tudarmstadt.ukp.inception.scheduling.Task.runSync(Task.java:203) [classes/:?]
at de.tudarmstadt.ukp.inception.scheduling.Task.run(Task.java:190) [classes/:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
Please complete the following information:
Version and build ID: [see bottom of the browser screen]
OS: [e.g. Windows, Linux, OS X]
Browser: [e.g. chrome, safari]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
Index metadata is kept in the database. It seems to be possible that situations could occur when the system tries to add a second index metadata entry for a project.
To Reproduce
Not sure. Looks like a race condition.
Expected behavior
Only a single index metadata item for a project should ever be added to a DB. If one already exists, no other one should be added.
Screenshots
Please complete the following information:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: