You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Goroutine 1:
Transaction 1:
Write b
Transaction 2:
Delete a
Goroutine 2:
Transaction 1:
Read a (using txn.Get inside db.View); it is not present (i.e. Get returns ErrKeyNotFound)
Transaction 2:
Read b (using txn.Get inside db.View); it is also not present
As long as no other goroutines delete a or b, shouldn't Goroutine 2 see at least one of a or b?
The text was updated successfully, but these errors were encountered:
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:
b
a
a
(usingtxn.Get
insidedb.View
); it is not present (i.e.Get
returnsErrKeyNotFound
)b
(usingtxn.Get
insidedb.View
); it is also not presentAs long as no other goroutines delete
a
orb
, shouldn't Goroutine 2 see at least one ofa
orb
?The text was updated successfully, but these errors were encountered: