afs commented on issue #1646: URL: https://github.com/apache/jena/issues/1646#issuecomment-1333812731
Right - GraphMem is not thread safe. The read side also needs a critical section (read) but the locks are MRSW so writing is single threaded, no reader at the time. Transaction are better (tm). `DatasetFactory.createTxnMem()` and graph from that type of dataset. ``` dataset.executeRead(()->so the query, do the business); ``` and ``` dataset.executeWrite(()->m.add(z)); ``` That's MR+SW (multiple readers AND one single writer). The query is isolated - it does not see changes while running. -- 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]
