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.

collect proof when stopping

Chris Lud3ae3a8e146f
diff --git a/weed/command/master.go b/weed/command/master.go
index cb6b492e32..cd15defce7 100644
--- a/weed/command/master.go
+++ b/weed/command/master.go
@@ -60,6 +60,9 @@ func runMaster(cmd *Command, args []string) bool {
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
+ OnInterrupt(func() {
+ pprof.StopCPUProfile()
+ })
}
if err := util.TestFolderWritable(*metaFolder); err != nil {
glog.Fatalf("Check Meta Folder (-mdir) Writable %s : %s", *metaFolder, err)