mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 22:43:41 +08:00
filer: fix elastic search pagination
possible fix for https://github.com/chrislusf/seaweedfs/issues/1774
This commit is contained in:
parent
609daaf387
commit
2396ac234c
@ -218,7 +218,6 @@ func (store *ElasticStore) listRootDirectoryEntries(ctx context.Context, startFi
|
||||
if entry, err := store.FindEntry(ctx,
|
||||
weed_util.FullPath("/"+strings.Replace(index.Index, indexPrefix, "", 1))); err == nil {
|
||||
fileName := getFileName(entry.FullPath)
|
||||
lastFileName = fileName
|
||||
if fileName == startFileName && !inclusive {
|
||||
continue
|
||||
}
|
||||
@ -229,6 +228,7 @@ func (store *ElasticStore) listRootDirectoryEntries(ctx context.Context, startFi
|
||||
if !eachEntryFunc(entry) {
|
||||
break
|
||||
}
|
||||
lastFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -278,13 +278,13 @@ func (store *ElasticStore) listDirectoryEntries(
|
||||
}
|
||||
nextStart = string(esEntry.Entry.FullPath)
|
||||
fileName := getFileName(esEntry.Entry.FullPath)
|
||||
lastFileName = fileName
|
||||
if fileName == startFileName && !inclusive {
|
||||
continue
|
||||
}
|
||||
if !eachEntryFunc(esEntry.Entry) {
|
||||
break
|
||||
}
|
||||
lastFileName = fileName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user