Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func (bkt *Bucket) dumpHtree() {
func (bkt *Bucket) getAllIndex(suffix string) (paths []string, ids []HintID) {
pattern := getIndexPath(bkt.Home, -1, -1, suffix)
paths0, _ := filepath.Glob(pattern)
sort.Sort(sort.StringSlice(paths0))
sort.Strings(paths0)
for _, p := range paths0 {
id, ok := parseIDFromPath(p)
if !ok {
Expand Down
4 changes: 2 additions & 2 deletions store/hint.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ func (h *hintMgr) Merge(forGC bool) (err error) {
// TODO: check hint with datas!
pattern := h.getPath(-1, -1, false)
paths, err := filepath.Glob(pattern)
sort.Sort(sort.StringSlice(paths))
sort.Strings(paths)

readers := make([]*hintFileReader, 0, len(paths))
var maxid HintID
Expand Down Expand Up @@ -639,7 +639,7 @@ func (hm *hintMgr) findValidPaths(chunkID int) (hints []string) {
return
}

sort.Sort(sort.StringSlice(paths))
sort.Strings(paths)
n := 0
for _, path := range paths {
name := filepath.Base(path)
Expand Down
2 changes: 1 addition & 1 deletion store/htree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func TestRebuildHtreeFromHints(b *testing.T) {

tree := newHTree(Conf.TreeDepth, int(pos), Conf.TreeHeight)
totalNumKey := 0
sort.Sort(sort.StringSlice(files))
sort.Strings(files)
for i, file := range files {
logger.Infof("loading: %s", file)
r := newHintFileReader(file, 0, 1024*1024)
Expand Down