arangodb / docs-hugo

Source code of the ArangoDB online documentation
https://docs.arangodb.com
Apache License 2.0
5 stars 5 forks source link

Contradiction about transactions locking at collection or document level #428

Open Simran-B opened 10 months ago

Simran-B commented 10 months ago

From @ile via community slack:

The RocksDB storage engine uses document-level locks and therefore will not have a deadlock problem on collection level.

https://docs.arangodb.com/3.11/develop/transactions/locking-and-isolation/

Transactions acquire collection locks for write operations in RocksDB. It is therefore advisable to keep the transactions as short as possible.

https://docs.arangodb.com/3.11/develop/transactions/stream-transactions/

Simran-B commented 10 months ago

The second page is specifically about Stream Transactions whereas the first page was written when there were only JavaScript Transactions, so it may not apply to Stream Transactions. This needs to be clarified, ideally going into some details about collection-level locking, e.g. for what operations they are used and why (indexes, schema validation?)