dgraph-io / badger

Fast key-value DB in Go.
https://dgraph.io/badger
Apache License 2.0
13.77k stars 1.17k forks source link

[QUESTION]: Can transactions be seen out-of-order within a single Go application? #2052

Open BatmanAoD opened 5 months ago

BatmanAoD commented 5 months ago

Question.

I have a Go application where it is assumed that a sequence of transactions performed by one goroutine will be seen (by other goroutines within the same application) as occurring in the order in which the goroutine performed them. Is this always guaranteed?

I'm trying to understand a specific behavior I'm seeing that is something like this:

As long as no other goroutines delete a or b, shouldn't Goroutine 2 see at least one of a or b?

github-actions[bot] commented 2 months ago

This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.