Describe the bug
Bulk-annotation action via search sidebar breaks when more than 100 documents are affected. The reason is that for every affected document, an IndexAnnotationDocumentTask is scheduled and the scheduler queue by default has a maximum length of 100.
To Reproduce
Steps to reproduce the behavior:
- Import 200 documents
- Perform a bulk-annotation action that affects all documents
- See error in log.
Expected behavior
No error. Maybe we need to increase the queue length by default... or implement a BulkIndexAnnotationDocumentTask to alleviate the problem...
Screenshots
2024-04-16 10:18:49 ERROR [SYSTEM] TransactionSynchronizationUtils - TransactionSynchronization.afterCompletion threw exception
java.util.concurrent.RejectedExecutionException: Task IndexAnnotationDocumentTask [project=..., sourceDocument=null, annotationDocument=....xmi, trigger=afterAnnotationUpdate] rejected from de.tudarmstadt.ukp.inception.scheduling.InspectableThreadPoolExecutor@33ab6975[Running, pool size = 4, active threads = 4, queued tasks = 100, completed tasks = 10947]
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1365) ~[?:?]
at de.tudarmstadt.ukp.inception.scheduling.SchedulingServiceImpl.schedule(SchedulingServiceImpl.java:303) ~[inception-scheduling-32.0-SNAPSHOT.jar!/:?]
at de.tudarmstadt.ukp.inception.scheduling.SchedulingServiceImpl.enqueue(SchedulingServiceImpl.java:260) ~[inception-scheduling-32.0-SNAPSHOT.jar!/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.enqueue(SearchServiceImpl.java:887) ~[inception-search-core-32.0-SNAPSHOT.jar!/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.enqueueIndexDocument(SearchServiceImpl.java:868) ~[inception-search-core-32.0-SNAPSHOT.jar!/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl.afterAnnotationUpdate(SearchServiceImpl.java:423) ~[inception-search-core-32.0-SNAPSHOT.jar!/:?]
at de.tudarmstadt.ukp.inception.search.SearchServiceImpl$$FastClassBySpringCGLIB$$d6146f50.invoke(<generated>) ~[inception-search-core-32.0-SNAPSHOT.jar!/:?]
Please complete the following information:
- Version and build ID: 32.0-beta-1
Describe the bug
Bulk-annotation action via search sidebar breaks when more than 100 documents are affected. The reason is that for every affected document, an
IndexAnnotationDocumentTaskis scheduled and the scheduler queue by default has a maximum length of 100.To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error. Maybe we need to increase the queue length by default... or implement a
BulkIndexAnnotationDocumentTaskto alleviate the problem...Screenshots
Please complete the following information: