Browse Source

Fix sorted needle file's write mode for (*SortedFileNeedleMap).Delete() (#5633)

pull/5638/head
NyaMisty 7 months ago
committed by GitHub
parent
commit
f2a37933b1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      weed/storage/needle_map_sorted_file.go

2
weed/storage/needle_map_sorted_file.go

@ -27,7 +27,7 @@ func NewSortedFileNeedleMap(indexBaseFileName string, indexFile *os.File) (m *So
} }
glog.V(1).Infof("Opening %s...", fileName) glog.V(1).Infof("Opening %s...", fileName)
if m.dbFile, err = os.Open(indexBaseFileName + ".sdx"); err != nil {
if m.dbFile, err = os.OpenFile(indexBaseFileName+".sdx", os.O_RDWR, 0); err != nil {
return return
} }
dbStat, _ := m.dbFile.Stat() dbStat, _ := m.dbFile.Stat()

Loading…
Cancel
Save