Browse Source

clean up *SkipListElementReference loaded from Redis

pull/2354/head
Chris Lu 3 years ago
parent
commit
947add39e6
  1. 10
      weed/filer/redis3/skiplist_element_store.go

10
weed/filer/redis3/skiplist_element_store.go

@ -48,5 +48,15 @@ func (m *SkipListElementStore) LoadElement(id int64) (*skiplist.SkipListElement,
}
t := &skiplist.SkipListElement{}
err = proto.Unmarshal([]byte(data), t)
if err == nil {
for i:=0;i<len(t.Next);i++{
if t.Next[i].IsNil() {
t.Next[i] = nil
}
}
if t.Prev.IsNil() {
t.Prev = nil
}
}
return t, err
}
Loading…
Cancel
Save