diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-21 12:14:40 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-21 12:14:40 -0700 |
| commit | ff97acae62e641c6255b18a3be403202557046b2 (patch) | |
| tree | 3b4bbcf680248fb35d78e3dafd60ca8d7dec4609 | |
| parent | d0ce5b020bd0b5c89cf1d4502d79bf4019bae3d5 (diff) | |
| download | seaweedfs-ff97acae62e641c6255b18a3be403202557046b2.tar.xz seaweedfs-ff97acae62e641c6255b18a3be403202557046b2.zip | |
more logs
| -rw-r--r-- | weed/filesys/filehandle.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index 789675486..81e4d7da5 100644 --- a/weed/filesys/filehandle.go +++ b/weed/filesys/filehandle.go @@ -156,10 +156,10 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error { Entry: fh.f.entry, } - //glog.V(1).Infof("%s/%s set chunks: %v", fh.f.dir.Path, fh.f.Name, len(fh.f.entry.Chunks)) - //for i, chunk := range fh.f.entry.Chunks { - // glog.V(4).Infof("%s/%s chunks %d: %v [%d,%d)", fh.f.dir.Path, fh.f.Name, i, chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size)) - //} + glog.V(3).Infof("%s/%s set chunks: %v", fh.f.dir.Path, fh.f.Name, len(fh.f.entry.Chunks)) + for i, chunk := range fh.f.entry.Chunks { + glog.V(3).Infof("%s/%s chunks %d: %v [%d,%d)", fh.f.dir.Path, fh.f.Name, i, chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size)) + } chunks, garbages := filer2.CompactFileChunks(fh.f.entry.Chunks) fh.f.entry.Chunks = chunks @@ -171,6 +171,9 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error { } fh.f.wfs.deleteFileChunks(ctx, garbages) + for i, chunk := range garbages { + glog.V(3).Infof("garbage %s/%s chunks %d: %v [%d,%d)", fh.f.dir.Path, fh.f.Name, i, chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size)) + } return nil }) |
