Read-only operations on FDBTransaction vs ReadSnapshot

(gaurav) #1


Is there any difference between doing read-only operations on FDBTransaction vs doing the same on ReadSnapshot?

As I understand, neither of these modes will create any conflict with any other concurrent transaction.

Just wanted to confirm if these two are equivalent (semantically and efficiency) if only read-only operations are involved?


(A.J. Beamon) #2

For a read-only transaction, there shouldn’t be any difference in the outcome between using snapshot reads or regular ones.

I would expect that doing snapshot reads would avoid a little work because it doesn’t have to maintain read conflict ranges, but I haven’t quantified how much difference you might see. If you end up comparing the performance of the two, I’d be interested to hear your results.