-
I use arcadedb in embedded mode, and got errors above in multiple threads code |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
ArcadeDB (like OrientDB and other DBMSs) uses a no-lock optimistic approach to transactions. If the same page is modified by another thread (or client), then the transaction must be repeated. You can wrap your transaction with: database.transaction( ()-> {
...
}); By default the transaction block is repeated in case of conflict up to 3 times. This setting can be changed by setting the You can also decide the number of retries by using this method: database.transaction( ()-> {
...
}, false, 10); Where 10 is the maximum number of attempts. |
Beta Was this translation helpful? Give feedback.
ArcadeDB (like OrientDB and other DBMSs) uses a no-lock optimistic approach to transactions. If the same page is modified by another thread (or client), then the transaction must be repeated. You can wrap your transaction with:
By default the transaction block is repeated in case of conflict up to 3 times. This setting can be changed by setting the
arcadedb.txRetries
to the default number of retries.You can also decide the number of retries by using this method:
Where 10 is the maximum number of attempts.