File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ type MutableTree struct {
3737 unsavedFastNodeRemovals map [string ]interface {} // FastNodes that have not yet been removed from disk
3838 ndb * nodeDB
3939
40- mtx sync.RWMutex // versions Read/write lock.
40+ mtx sync.Mutex
4141}
4242
4343// NewMutableTree returns a new tree with the specified cache size and datastore.
@@ -88,8 +88,8 @@ func (tree *MutableTree) VersionExists(version int64) bool {
8888
8989// AvailableVersions returns all available versions in ascending order
9090func (tree * MutableTree ) AvailableVersions () []int {
91- tree .mtx .RLock ()
92- defer tree .mtx .RUnlock ()
91+ tree .mtx .Lock ()
92+ defer tree .mtx .Unlock ()
9393
9494 res := make ([]int , 0 , len (tree .versions ))
9595 for i , v := range tree .versions {
You can’t perform that action at this time.
0 commit comments