aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/store_replicate.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology/store_replicate.go')
-rw-r--r--weed/topology/store_replicate.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/topology/store_replicate.go b/weed/topology/store_replicate.go
index b4a7d649c..a2be991fa 100644
--- a/weed/topology/store_replicate.go
+++ b/weed/topology/store_replicate.go
@@ -47,6 +47,11 @@ func ReplicatedWrite(masterFn operation.GetMasterFn, grpcDialOption grpc.DialOpt
if s.GetVolume(volumeId) != nil {
start := time.Now()
+
+ inFlightGauge := stats.VolumeServerInFlightRequestsGauge.WithLabelValues(stats.WriteToLocalDisk)
+ inFlightGauge.Inc()
+ defer inFlightGauge.Dec()
+
isUnchanged, err = s.WriteVolumeNeedle(volumeId, n, true, fsync)
stats.VolumeServerRequestHistogram.WithLabelValues(stats.WriteToLocalDisk).Observe(time.Since(start).Seconds())
if err != nil {
@@ -59,6 +64,11 @@ func ReplicatedWrite(masterFn operation.GetMasterFn, grpcDialOption grpc.DialOpt
if len(remoteLocations) > 0 { //send to other replica locations
start := time.Now()
+
+ inFlightGauge := stats.VolumeServerInFlightRequestsGauge.WithLabelValues(stats.WriteToReplicas)
+ inFlightGauge.Inc()
+ defer inFlightGauge.Dec()
+
err = DistributedOperation(remoteLocations, func(location operation.Location) error {
u := url.URL{
Scheme: "http",