afs commented on issue #2584:
URL: https://github.com/apache/jena/issues/2584#issuecomment-2243009944

   OK - I think I've found the problem.
   
   It seems that there are lots of threads. `.end()` is failing to release a 
lock - the lock is re-entrant so this only goes wrong when a many threads are 
created.  If the threads are from a pool, the lock is used as a re-entrant lock 
and the system limit isn't reached.
   
   Could you please try:
   
   ```java
    dataset.begin(TxnType.READ);
       try {
         // Execute query
         dataset.commit();
         // return result
       } finally {
         dataset.end();
       }
   ```
   to confirm this analysis.
   
   FYI: There is support for this pattern --
   ```
       result = dataset.calculateRead(()->1);
   ```
   will achieve the same (albeit boxed if a primitive type).
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to