diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-02-02 11:34:12 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-02-02 11:34:12 -0800 |
| commit | 2396ac234c060774ef0640f513fee2e424fbb706 (patch) | |
| tree | 2cb5c483d721181a7576ef6f3c5d832cb70ccb6d | |
| parent | 609daaf3878927f86a4d4a59eb7f8d9786232a5c (diff) | |
| download | seaweedfs-2396ac234c060774ef0640f513fee2e424fbb706.tar.xz seaweedfs-2396ac234c060774ef0640f513fee2e424fbb706.zip | |
filer: fix elastic search pagination
possible fix for https://github.com/chrislusf/seaweedfs/issues/1774
| -rw-r--r-- | weed/filer/elastic/v7/elastic_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filer/elastic/v7/elastic_store.go b/weed/filer/elastic/v7/elastic_store.go index 1e7f55599..14719e6ed 100644 --- a/weed/filer/elastic/v7/elastic_store.go +++ b/weed/filer/elastic/v7/elastic_store.go @@ -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 } } } |
