orion-server icon indicating copy to clipboard operation
orion-server copied to clipboard

Perform mvcc read validation in parallel

Open liran-funaro opened this issue 2 years ago • 0 comments

The current implementation goes over each read operation- one by one- and validates if it was already written in this block and if the read version matches the current version.

The current design avoids redundant reading of keys' versions by checking first if previous pending operations overwrote this key. But this enforces a sequential implementation.

Instead, this PR takes an eager, optimistic approach. We assume that conflicts are rare, so we eagerly read all keys' versions in parallel and check if the version matches. Then, if all is OK, we continue to check the operations one by one to see if one operation invalidates another.

This removes the bottleneck caused by the expensive version read operation.

Signed-off-by: Liran Funaro [email protected]

liran-funaro avatar Jan 29 '23 13:01 liran-funaro