mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
adjust logging
This commit is contained in:
parent
28d1b34856
commit
8a42aa8221
|
@ -74,8 +74,6 @@ func (f *Filer) RollbackTransaction(ctx context.Context) error {
|
||||||
|
|
||||||
func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) error {
|
func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) error {
|
||||||
|
|
||||||
glog.V(4).Infof("CreateEntry create %s", entry.FullPath)
|
|
||||||
|
|
||||||
if string(entry.FullPath) == "/" {
|
if string(entry.FullPath) == "/" {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -159,6 +157,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
|
||||||
|
|
||||||
oldEntry, _ := f.FindEntry(ctx, entry.FullPath)
|
oldEntry, _ := f.FindEntry(ctx, entry.FullPath)
|
||||||
|
|
||||||
|
glog.V(4).Infof("CreateEntry %s: old entry : %v", entry.FullPath, oldEntry)
|
||||||
if oldEntry == nil {
|
if oldEntry == nil {
|
||||||
if err := f.store.InsertEntry(ctx, entry); err != nil {
|
if err := f.store.InsertEntry(ctx, entry); err != nil {
|
||||||
glog.Errorf("insert entry %s: %v", entry.FullPath, err)
|
glog.Errorf("insert entry %s: %v", entry.FullPath, err)
|
||||||
|
|
|
@ -104,18 +104,18 @@ func GetEntry(ctx context.Context, filerClient FilerClient, fullFilePath FullPat
|
||||||
Name: name,
|
Name: name,
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(3).Infof("read %s request: %v", fullFilePath, request)
|
// glog.V(3).Infof("read %s request: %v", fullFilePath, request)
|
||||||
resp, err := client.LookupDirectoryEntry(ctx, request)
|
resp, err := client.LookupDirectoryEntry(ctx, request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == ErrNotFound || strings.Contains(err.Error(), ErrNotFound.Error()) {
|
if err == ErrNotFound || strings.Contains(err.Error(), ErrNotFound.Error()) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
glog.V(3).Infof("read %s attr %v: %v", fullFilePath, request, err)
|
glog.V(3).Infof("read %s %v: %v", fullFilePath, resp, err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if resp.Entry == nil {
|
if resp.Entry == nil {
|
||||||
glog.V(3).Infof("read %s entry: %v", fullFilePath, entry)
|
// glog.V(3).Infof("read %s entry: %v", fullFilePath, entry)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.
|
||||||
entry := dir.wfs.cacheGet(fullFilePath)
|
entry := dir.wfs.cacheGet(fullFilePath)
|
||||||
|
|
||||||
if entry == nil {
|
if entry == nil {
|
||||||
glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
|
// glog.V(3).Infof("dir Lookup cache miss %s", fullFilePath)
|
||||||
entry, err = filer2.GetEntry(ctx, dir.wfs, fullFilePath)
|
entry, err = filer2.GetEntry(ctx, dir.wfs, fullFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(1).Infof("dir GetEntry %s: %v", fullFilePath, err)
|
glog.V(1).Infof("dir GetEntry %s: %v", fullFilePath, err)
|
||||||
|
|
|
@ -115,7 +115,7 @@ func (wfs *WFS) maybeLoadEntry(ctx context.Context, dir, name string) (entry *fi
|
||||||
if entry != nil {
|
if entry != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
glog.V(3).Infof("read entry cache miss %s", fullpath)
|
// glog.V(3).Infof("read entry cache miss %s", fullpath)
|
||||||
|
|
||||||
err = wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
err = wfs.WithFilerClient(ctx, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ func (wfs *WFS) maybeLoadEntry(ctx context.Context, dir, name string) (entry *fi
|
||||||
glog.V(3).Infof("file attr read not found file %v: %v", request, err)
|
glog.V(3).Infof("file attr read not found file %v: %v", request, err)
|
||||||
return fuse.ENOENT
|
return fuse.ENOENT
|
||||||
}
|
}
|
||||||
glog.V(3).Infof("file attr read file %v: %v", request, err)
|
glog.V(3).Infof("attr read %v: %v", request, err)
|
||||||
return fuse.EIO
|
return fuse.EIO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue