aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNyaMisty <gyc990326@gmail.com>2024-06-03 05:12:25 +0800
committerGitHub <noreply@github.com>2024-06-02 14:12:25 -0700
commitf2a37933b1ffa0d3b60df3a24ec201a3dba2a6cd (patch)
tree0bed8d5402e5c1326fe14fbe2250b670238ed137
parent3ddfd15ec1428f9928a1248f8f8b7bc00ffd89b7 (diff)
downloadseaweedfs-f2a37933b1ffa0d3b60df3a24ec201a3dba2a6cd.tar.xz
seaweedfs-f2a37933b1ffa0d3b60df3a24ec201a3dba2a6cd.zip
Fix sorted needle file's write mode for (*SortedFileNeedleMap).Delete() (#5633)
-rw-r--r--weed/storage/needle_map_sorted_file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/needle_map_sorted_file.go b/weed/storage/needle_map_sorted_file.go
index 0433ffa0d..5bd67ea86 100644
--- a/weed/storage/needle_map_sorted_file.go
+++ b/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)
- 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
}
dbStat, _ := m.dbFile.Stat()