aboutsummaryrefslogtreecommitdiff
path: root/tx.go
diff options
context:
space:
mode:
Diffstat (limited to 'tx.go')
-rw-r--r--tx.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tx.go b/tx.go
index 3a1506c..c064f76 100644
--- a/tx.go
+++ b/tx.go
@@ -121,12 +121,14 @@ func (tx *Tx) Assert(p bool) {
}
func (tx *Tx) reset() {
+ tx.mu.Lock()
for k := range tx.reads {
delete(tx.reads, k)
}
for k := range tx.writes {
delete(tx.writes, k)
}
+ tx.mu.Unlock()
tx.removeRetryProfiles()
tx.resetLocks()
}