diff --git a/controllers/replication.storage/volumereplication_controller.go b/controllers/replication.storage/volumereplication_controller.go index 5ecf0e8fd..236eab6fd 100644 --- a/controllers/replication.storage/volumereplication_controller.go +++ b/controllers/replication.storage/volumereplication_controller.go @@ -380,6 +380,15 @@ func (r *VolumeReplicationReconciler) Reconcile(ctx context.Context, req ctrl.Re if ts != nil { lastSyncTime := metav1.NewTime(ts.AsTime()) instance.Status.LastSyncTime = &lastSyncTime + td := info.GetLastSyncDuration() + if td != nil { + lastSyncDuration := metav1.Duration{Duration: td.AsDuration()} + instance.Status.LastSyncDuration = &lastSyncDuration + } + tb := info.GetLastSyncBytes() + if tb != 0 { + instance.Status.LastSyncBytes = tb + } } requeueForInfo = true } else if !util.IsUnimplementedError(err) { diff --git a/internal/sidecar/service/volumereplication.go b/internal/sidecar/service/volumereplication.go index e55ad280d..08e8fe487 100644 --- a/internal/sidecar/service/volumereplication.go +++ b/internal/sidecar/service/volumereplication.go @@ -219,8 +219,12 @@ func (rs *ReplicationServer) GetVolumeReplicationInfo( if lastsynctime == nil { klog.Errorf("Failed to get last sync time: %v", lastsynctime) } + lastsyncduration := resp.GetLastSyncDuration() + lastsyncbytes := resp.GetLastSyncBytes() return &proto.GetVolumeReplicationInfoResponse{ - LastSyncTime: lastsynctime, + LastSyncTime: lastsynctime, + LastSyncDuration: lastsyncduration, + LastSyncBytes: lastsyncbytes, }, nil }