diff options
| author | chrislu <chris.lu@gmail.com> | 2025-05-22 09:54:31 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-05-22 09:54:31 -0700 |
| commit | 0d62be44846354c3c37b857028297edd4b8df17b (patch) | |
| tree | c89320a7d58351030f1b740c7267f56bf0206429 /weed/mount/filehandle_read.go | |
| parent | d8c574a5ef1a811f9a0d447097d9edfcc0c1d84c (diff) | |
| download | seaweedfs-origin/changing-to-zap.tar.xz seaweedfs-origin/changing-to-zap.zip | |
Diffstat (limited to 'weed/mount/filehandle_read.go')
| -rw-r--r-- | weed/mount/filehandle_read.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go index ce5f96341..c455b3624 100644 --- a/weed/mount/filehandle_read.go +++ b/weed/mount/filehandle_read.go @@ -6,7 +6,7 @@ import ( "io" "github.com/seaweedfs/seaweedfs/weed/filer" - "github.com/seaweedfs/seaweedfs/weed/glog" + "github.com/seaweedfs/seaweedfs/weed/util/log" "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" ) @@ -31,10 +31,10 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e entry := fh.GetEntry() if entry.IsInRemoteOnly() { - glog.V(4).Infof("download remote entry %s", fileFullPath) + log.V(-1).Infof("download remote entry %s", fileFullPath) err := fh.downloadRemoteEntry(entry) if err != nil { - glog.V(1).Infof("download remote entry %s: %v", fileFullPath, err) + log.V(2).Infof("download remote entry %s: %v", fileFullPath, err) return 0, 0, err } } @@ -45,28 +45,28 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, e } if fileSize == 0 { - glog.V(1).Infof("empty fh %v", fileFullPath) + log.V(2).Infof("empty fh %v", fileFullPath) return 0, 0, io.EOF } else if offset == fileSize { return 0, 0, io.EOF } else if offset >= fileSize { - glog.V(1).Infof("invalid read, fileSize %d, offset %d for %s", fileSize, offset, fileFullPath) + log.V(2).Infof("invalid read, fileSize %d, offset %d for %s", fileSize, offset, fileFullPath) return 0, 0, io.EOF } if offset < int64(len(entry.Content)) { totalRead := copy(buff, entry.Content[offset:]) - glog.V(4).Infof("file handle read cached %s [%d,%d] %d", fileFullPath, offset, offset+int64(totalRead), totalRead) + log.V(-1).Infof("file handle read cached %s [%d,%d] %d", fileFullPath, offset, offset+int64(totalRead), totalRead) return int64(totalRead), 0, nil } totalRead, ts, err := fh.entryChunkGroup.ReadDataAt(fileSize, buff, offset) if err != nil && err != io.EOF { - glog.Errorf("file handle read %s: %v", fileFullPath, err) + log.Errorf("file handle read %s: %v", fileFullPath, err) } - // glog.V(4).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err) + // log.V(-1).Infof("file handle read %s [%d,%d] %d : %v", fileFullPath, offset, offset+int64(totalRead), totalRead, err) return int64(totalRead), ts, err } @@ -83,7 +83,7 @@ func (fh *FileHandle) downloadRemoteEntry(entry *LockedEntry) error { Name: entry.Name, } - glog.V(4).Infof("download entry: %v", request) + log.V(-1).Infof("download entry: %v", request) resp, err := client.CacheRemoteObjectToLocalCluster(context.Background(), request) if err != nil { return fmt.Errorf("CacheRemoteObjectToLocalCluster file %s: %v", fileFullPath, err) |
