Browse Source

adjust memory layout to avoid possible nil pointer

pull/991/head
Chris Lu 6 years ago
parent
commit
177f3add81
  1. 4
      weed/storage/needle_map.go
  2. 3
      weed/storage/needle_map_memory.go

4
weed/storage/needle_map.go

@ -37,10 +37,10 @@ type NeedleMapper interface {
}
type baseNeedleMapper struct {
mapMetric
indexFile *os.File
indexFileAccessLock sync.Mutex
mapMetric
}
func (nm *baseNeedleMapper) IndexFileSize() uint64 {

3
weed/storage/needle_map_memory.go

@ -10,9 +10,8 @@ import (
)
type NeedleMap struct {
m needle_map.NeedleValueMap
baseNeedleMapper
m needle_map.NeedleValueMap
}
func NewCompactNeedleMap(file *os.File) *NeedleMap {

Loading…
Cancel
Save