You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jena.apache.org by GitBox <gi...@apache.org> on 2022/12/01 13:32:30 UTC
[GitHub] [jena] ebremer commented on issue #1646: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 952182 out of bounds for length 635413
ebremer commented on issue #1646:
URL: https://github.com/apache/jena/issues/1646#issuecomment-1333776785
I was able to fix this last night. The "do the business" was sending a list of resources and object values from the ResultSet to a ThreadPoolExecutor to process over 64 cores. Whereas, the individual threads kept mostly to themselves, each was adding the results back to the original Model as follows:
```
m.enterCriticalSection(Lock.WRITE);
m.add(z);
m.leaveCriticalSection();
```
The code work for thousands of large graphs, but for one, kept throwing the same above error. I was able to fix the issue by buffering up all of the threads and then calling engine.prestartAllCoreThreads() after the
```
rs.forEachRemaining(qs->{
do the business *
});
```
loop was done. ResultSet rs = qe.execSelect().materialise(); looks like it would have solved the issue too so I will have to give it a try. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@jena.apache.org
For additional commands, e-mail: issues-help@jena.apache.org