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.

align

Konstantin Lebedev2a5629dd2841
diff --git a/weed/stats/metrics_names.go b/weed/stats/metrics_names.go
index d4f9c23c9f..722f4ad944 100644
--- a/weed/stats/metrics_names.go
+++ b/weed/stats/metrics_names.go
@@ -4,7 +4,8 @@ package stats
// The naming convention is ErrorSomeThing = "error.some.thing"
const (
// volume server
- LocalWrite = "localWrite"
+ WriteToLocalDisk = "writeToLocalDisk"
+ WriteToReplicas = "writeToReplicas"
ReplicatedWrite = "replicatedWrite"
ErrorSizeMismatchOffsetSize = "errorSizeMismatchOffsetSize"
ErrorSizeMismatch = "errorSizeMismatch"
diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go
index 0fff29ba6b..816f1fbe46 100644
--- a/weed/topology/store_replicate.go
+++ b/weed/topology/store_replicate.go
@@ -46,7 +46,7 @@ func ReplicatedWrite(masterFn operation.GetMasterFn, grpcDialOption grpc.DialOpt
if s.GetVolume(volumeId) != nil {
start := time.Now()
isUnchanged, err = s.WriteVolumeNeedle(volumeId, n, true, fsync)
- stats.VolumeServerRequestHistogram.WithLabelValues(stats.LocalWrite).Observe(time.Since(start).Seconds())
+ stats.VolumeServerRequestHistogram.WithLabelValues(stats.WriteToLocalDisk).Observe(time.Since(start).Seconds())
if err != nil {
stats.VolumeServerRequestCounter.WithLabelValues(stats.ErrorWriteToLocalDisk).Inc()
err = fmt.Errorf("failed to write to local disk: %v", err)
@@ -102,7 +102,7 @@ func ReplicatedWrite(masterFn operation.GetMasterFn, grpcDialOption grpc.DialOpt
_, err := operation.UploadData(n.Data, uploadOption)
return err
})
- stats.VolumeServerRequestHistogram.WithLabelValues(stats.ReplicatedWrite).Observe(time.Since(start).Seconds())
+ stats.VolumeServerRequestHistogram.WithLabelValues(stats.WriteToReplicas).Observe(time.Since(start).Seconds())
if err != nil {
stats.VolumeServerRequestCounter.WithLabelValues(stats.ErrorWriteToReplicas).Inc()
err = fmt.Errorf("failed to write to replicas for volume %d: %v", volumeId, err)