Replies: 2 comments 1 reply
-
I think we could simplify the usage of About the isolation level, we updated the manual in the past months, Check here: https://docs.arcadedb.com/#Transactions. The default isolation level is What's your use case for |
Beta Was this translation helpful? Give feedback.
-
Yes, the isolation level is now clearly described in the manual. |
Beta Was this translation helpful? Give feedback.
-
The usability of the .transaction() method with a lambda is limited by the constraint that a lambda body can only contain references to final or effectively final variables, and this excludes the vast majority of variables defined outside the lambda scope, in a non-trivial application.
As a consequence, it is very common to use the traditional .begin(), .commit(), .rollback() idiom.
It would therefore be useful to improve the description of the .begin(), .commit(), .rollback() idiom in the manual.
In particular, there are circumstances in which the transaction is automatically rolled back by the engine, and in that case the .rollback() method invocation in a catch block will throw a "Transaction not begun" exception.
To handle this scenario, the catch block should contain a check on the transaction status:
It would also be useful to specify what is the default isolation level, as it is not clear by reading the manual: READ_COMMITTED and REPEATABLE_READ are only mentioned in the chapter that describes the SQL Batch command, so it's not clear if those statements about the isolation level apply to the engine in general or only to the batch functionality.
Furthermore, it would be useful to add an explanation of how to emulate a SERIALIZABLE isolation level, assuming it is possible.
Beta Was this translation helpful? Give feedback.
All reactions