aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-01-24 20:06:58 -0800
committerChris Lu <chris.lu@gmail.com>2020-01-24 20:06:58 -0800
commitb6e6ca85954f27ed3a5f8a9cdb1eab26a4122fcd (patch)
treef108ead72cfb8e6c2d4afe32e4793f1254a75a26
parentd4cde5df49b4165f5695f0f4d7a8e3e1aa8e50ab (diff)
downloadseaweedfs-b6e6ca85954f27ed3a5f8a9cdb1eab26a4122fcd.tar.xz
seaweedfs-b6e6ca85954f27ed3a5f8a9cdb1eab26a4122fcd.zip
adjust logs
-rw-r--r--weed/filer2/filer.go6
-rw-r--r--weed/storage/volume_read_write.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/weed/filer2/filer.go b/weed/filer2/filer.go
index 5afb2b255..f95dce4df 100644
--- a/weed/filer2/filer.go
+++ b/weed/filer2/filer.go
@@ -74,6 +74,8 @@ func (f *Filer) RollbackTransaction(ctx context.Context) 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) == "/" {
return nil
}
@@ -127,6 +129,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
}
} else if !dirEntry.IsDirectory() {
+ glog.Errorf("CreateEntry %s: %s should be a directory", entry.FullPath, dirPath)
return fmt.Errorf("%s is a file", dirPath)
}
@@ -141,6 +144,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
}
if lastDirectoryEntry == nil {
+ glog.Errorf("CreateEntry %s: lastDirectoryEntry is nil", entry.FullPath)
return fmt.Errorf("parent folder not found: %v", entry.FullPath)
}
@@ -169,6 +173,8 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool) erro
}
}
+ // glog.V(4).Infof("CreateEntry %s: created", entry.FullPath)
+
f.NotifyUpdateEvent(oldEntry, entry, true)
f.deleteChunksIfNotNew(oldEntry, entry)
diff --git a/weed/storage/volume_read_write.go b/weed/storage/volume_read_write.go
index 0aa3f794b..ac6154cef 100644
--- a/weed/storage/volume_read_write.go
+++ b/weed/storage/volume_read_write.go
@@ -64,7 +64,7 @@ func (v *Volume) Destroy() (err error) {
}
func (v *Volume) writeNeedle(n *needle.Needle) (offset uint64, size uint32, isUnchanged bool, err error) {
- glog.V(4).Infof("writing needle %s", needle.NewFileIdFromNeedle(v.Id, n).String())
+ // glog.V(4).Infof("writing needle %s", needle.NewFileIdFromNeedle(v.Id, n).String())
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
if v.isFileUnchanged(n) {