Skip to content

Commit

Permalink
Stop walk early if we are on mutable path
Browse files Browse the repository at this point in the history
  • Loading branch information
outofforest committed Dec 6, 2024
1 parent 83c64b5 commit 573ad10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion space/space.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,11 @@ func (s *Space[K, V]) walkPointers(
hashBuff []byte,
hashKeyFunc func(key *K, buff []byte, level uint8) types.KeyHash,
) error {
if v.nextDataNode != nil && types.Load(v.nextDataNode) != types.FreeAddress {
if v.nextDataNode != nil {
if types.Load(v.nextDataNode) == types.FreeAddress {
return nil
}

v.storeRequest.PointersToStore--
v.level--
v.nextDataNode = nil
Expand Down

0 comments on commit 573ad10

Please sign in to comment.