aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbruce-zzz <bruce.zou@hhy-data.com>2025-12-10 11:21:39 +0800
committerbruce-zzz <bruce.zou@hhy-data.com>2025-12-10 11:21:39 +0800
commitbc1a120b6e25b88b9fa7751b22eea6a7c1effdca (patch)
tree2592409ebdffcca0c5ab1fd3f01c0abaf3966f9b
parent8bdccdcb396716d7d828a0a3515158423a72bf68 (diff)
downloadseaweedfs-bc1a120b6e25b88b9fa7751b22eea6a7c1effdca.tar.xz
seaweedfs-bc1a120b6e25b88b9fa7751b22eea6a7c1effdca.zip
remove else branch
-rw-r--r--weed/mount/weedfs_dir_read.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/weed/mount/weedfs_dir_read.go b/weed/mount/weedfs_dir_read.go
index cf42298bd..26943cd59 100644
--- a/weed/mount/weedfs_dir_read.go
+++ b/weed/mount/weedfs_dir_read.go
@@ -286,39 +286,6 @@ func (wfs *WFS) doReadDirectory(input *fuse.ReadIn, out *fuse.DirEntryList, isPl
dh.isFinished = true
}
}
- } else {
- // offset < entryStreamOffset: first batch loading
- if err := meta_cache.EnsureVisited(wfs.metaCache, wfs, dirPath); err != nil {
- glog.Errorf("dir ReadDirAll %s: %v", dirPath, err)
- return fuse.EIO
- }
-
- if input.Offset == 0 {
- dh.reset()
- }
-
- loadedCount := 0
- bufferFull := false
- loadErr := wfs.metaCache.ListDirectoryEntries(context.Background(), dirPath, "", false, int64(batchSize), func(entry *filer.Entry) (bool, error) {
- currentIndex := int64(len(dh.entryStream))
- dh.entryStream = append(dh.entryStream, entry)
- loadedCount++
- if !processEachEntryFn(entry, currentIndex) {
- bufferFull = true
- return false, nil
- }
- return true, nil
- })
- if loadErr != nil {
- glog.Errorf("list meta cache: %v", loadErr)
- return fuse.EIO
- }
-
- // Mark finished only when loading completed normally (not buffer full)
- // and we got fewer entries than requested
- if !bufferFull && loadedCount < batchSize {
- dh.isFinished = true
- }
}
return fuse.OK