Skip to content

concurrent mofification on page #475

Answered by lvca
kran asked this question in Q&A
Aug 6, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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 arcadedb.txRetries to the default number of retries.

You can also decide the number of retries by using this method:

database.transaction( ()-> {
  ...
}, false, 10);

Where 10 is the maximum number of attempts.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sharanAmit
Comment options

@lvca
Comment options

lvca Jan 15, 2025
Maintainer

Answer selected by kran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants