Skip to content

Dealing with contention on updates #1129

Closed Answered by lvca
vic0824 asked this question in Q&A
Jun 15, 2023 · 8 comments · 20 replies
Discussion options

You must be logged in to vote

Yes, without the call to waitCompletion(), the async thread haven't committed pending operations. This is configurable with the setting arcadedb.asyncTxBatchSize that is se to 10,240 by default, namely it commits every 10K operations.

You can also change that to commit every time, just use this at the beginning GlobalConfiguration.ASYNC_TX_BATCH_SIZE.setValue(1); but it would be much slower, of course.

For your use case, if I understand correctly, since you have these batches of updates, the best way is to do as with my test: one thread checks if the record exists, and then it schedules create or update in async tasks.

When everything is sent, you just wait for the finish. At that point e…

Replies: 8 comments 20 replies

Comment options

You must be logged in to vote
1 reply
@lvca
Comment options

Comment options

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

@lvca
Comment options

Comment options

You must be logged in to vote
3 replies
@lvca
Comment options

@vic0824
Comment options

@lvca
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@vic0824
Comment options

@lvca
Comment options

@vic0824
Comment options

@lvca
Comment options

Answer selected by vic0824
@lvca
Comment options

@vic0824
Comment options

@lvca
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@vic0824
Comment options

@lvca
Comment options

@vic0824
Comment options

@lvca
Comment options

@lvca
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working performance
2 participants