Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

better logs

Chris Lu7b81cf37628b
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index c71f1ee369..7ab2513e11 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -143,9 +143,9 @@ func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *f
Collection: "",
}
- glog.V(1).Infof("assign volume: %v", request)
resp, err := client.AssignVolume(ctx, request)
if err != nil {
+ glog.V(0).Infof("assign volume failure %v: %v", request, err)
return err
}
@@ -160,9 +160,11 @@ func (fh *FileHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *f
bufReader := bytes.NewReader(req.Data)
uploadResult, err := operation.Upload(fileUrl, fh.name, bufReader, false, "application/octet-stream", nil, "")
if err != nil {
+ glog.V(0).Infof("upload data %v to %s: %v", req, fileUrl, err)
return fmt.Errorf("upload data: %v", err)
}
if uploadResult.Error != "" {
+ glog.V(0).Infof("upload failure %v to %s: %v", req, fileUrl, err)
return fmt.Errorf("upload result: %v", uploadResult.Error)
}
@@ -217,6 +219,9 @@ func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error {
}
glog.V(1).Infof("%s/%s set chunks: %v", fh.dirPath, fh.name, len(fh.Chunks))
+ for i, chunk := range fh.Chunks {
+ glog.V(1).Infof("%s/%s chunks %d: %v [%d,%d)", fh.dirPath, fh.name, i, chunk.FileId, chunk.Offset, chunk.Offset+int64(chunk.Size))
+ }
if _, err := client.UpdateEntry(ctx, request); err != nil {
return fmt.Errorf("update fh: %v", err)
}