Skip to content

Commit 9e1cbfb

Browse files
committed
Release snapshot.
1 parent 7f2d70a commit 9e1cbfb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vfs/mvcc/mvcc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@ func (m *mvccFile) Unlock(lock vfs.LockLevel) error {
279279
m.waiter.Broadcast()
280280
}
281281
}
282+
if lock == vfs.LOCK_NONE {
283+
m.data = nil
284+
}
282285
m.lock = lock
283286
return nil
284287
}
@@ -299,6 +302,8 @@ func (m *mvccFile) CommitPhaseTwo() error {
299302
m.mtx.Lock()
300303
defer m.mtx.Unlock()
301304
m.mvccDB.data = m.data
305+
m.lock = vfs.LOCK_NONE
306+
m.data = nil
302307
}
303308
return nil
304309
}

0 commit comments

Comments
 (0)