Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent async transactions cause conflicts #113

Closed
jsimnz opened this issue Jan 12, 2022 · 0 comments · Fixed by #160
Closed

Concurrent async transactions cause conflicts #113

jsimnz opened this issue Jan 12, 2022 · 0 comments · Fixed by #160

Comments

@jsimnz
Copy link
Member

jsimnz commented Jan 12, 2022

Documenting this for historical purposes.

Found a bug where when running multiple concurrent/asynchronous transactions to insert data can potentially cause a transaction conflict congestion, causing all the TXs to block each other.

This was found when writing the benchmarking code which inserts upwards of 1,000,000 records concurrently into the database.

Fundamentally, this is caused by the IPLD blocks of the delta CRDT payloads using the CIDs of the block as the datastore key. The same data (document field values) produces the same key. So different create operations within their own datastore transactions will be manipulating equivalent data, stepping on eachother.

Fixed in the feat/benchmark-suite branch by adding the DocKey to the IPLD delta blocks which ensures that blocks with the same data, from different docs produce different block CIDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant