From 9ba06e3d5b23e73a75b4b3efe9ce8ad943b2e3f2 Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev Date: Thu, 24 Dec 2020 13:47:29 +0500 Subject: [PATCH] logging isDirectoryAllEmpty https://github.com/chrislusf/seaweedfs/issues/1701 --- weed/s3api/s3api_objects_list_handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go index 0af099967..3c5c2dcdf 100644 --- a/weed/s3api/s3api_objects_list_handlers.go +++ b/weed/s3api/s3api_objects_list_handlers.go @@ -310,6 +310,7 @@ func getListObjectsV1Args(values url.Values) (prefix, marker, delimiter string, func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerClient, parentDir, name string) (isEmpty bool, err error) { // println("+ isDirectoryAllEmpty", dir, name) + glog.V(8).Infof("isDirectoryAllEmpty() start parentDir: %s", parentDir) var fileCounter int var subDirs []string currentDir := parentDir + "/" + name @@ -324,6 +325,7 @@ func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerCli } startFrom = entry.Name isExhausted = isExhausted || isLast + glog.V(8).Infof("filer_pb.SeaweedList() startFrom: %s isExhausted: %t", startFrom, isExhausted) return nil }, startFrom, false, 8) } @@ -338,6 +340,8 @@ func (s3a *S3ApiServer) isDirectoryAllEmpty(filerClient filer_pb.SeaweedFilerCli for _, subDir := range subDirs { isSubEmpty, subErr := s3a.isDirectoryAllEmpty(filerClient, currentDir, subDir) + glog.V(8).Infof("s3a.isDirectoryAllEmpty() subDir: %s, isSubEmpty: %t", subDir, isSubEmpty) + if subErr != nil { return false, subErr }