afs commented on issue #1961: URL: https://github.com/apache/jena/issues/1961#issuecomment-1658354208
GraphTx does more. Because that includes multiple true concurrent views of the data it will cost more. It does not require the Kotlin runtime. This is like "autocommit" for SQL databases. It has all the consequences of that as well. It has more overhead, and does give application change consistency (e.g. a read-modify-write) is two transactions and other transactions/thread may change or view the database between the "read" and the "write"). A back account with $1000. To add to the account, an app reads the amount, adds the extra amount, deltes the old value and writes the new value (let' assume there is a modify does delete-add atomically and not get into the fact `Model` doesn't have such a thing). Thread A adds $500, thread B adds $250, what is the account now? With just safe read-modify operations, the answer is one of $1250, $1500, and $1750 depending on the way the operations interleave. Any solution to the concurrent read-modify-write needs the application to indicate the start and finish of a block of code so it can read the data, decide on the change and write the data without any other code invalidating the decision. `Model` provides `enterCriticalSection` and `leaveCriticalSection`. This is rather old fashioned way to deal with the problem. But it at least gives a block of code over several operations. -- 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]
