Adi Polak
09/09/2022, 12:31 PMItai Admi
09/09/2022, 2:27 PMkvstore
. The kvstore
simple interface allows many different databases to implement it, currently we have DynamoDB and Postgres.
We use the SetIf
functionality to ensure that operation that started on a given entity (e.g. branch) will only succeed if the entity didn’t change since it was read (e.g. multiple operations trying to change the branch HEAD). Other than that we must configure the DB in a way that will ensure read-after-write consistency, luckily DynamoDB has that option.Adi Polak
09/11/2022, 4:00 AMItai Admi
09/11/2022, 7:55 AMSetIf
functionality is a fancy name for compare-and-swap
. There’s no easy way to achieve this with S3, so the answer is unfortunately not at this moment.Adi Polak
09/12/2022, 5:04 AMItai Admi
09/12/2022, 7:20 AMPutItemWithContext
is the golang sdk api). We use ConditionExpression to compare the blobs. Code reference.Adi Polak
09/12/2022, 1:03 PM