You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
619 B

  1. package weed_server
  2. import (
  3. "context"
  4. "fmt"
  5. "github.com/chrislusf/seaweedfs/weed/glog"
  6. "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
  7. "github.com/chrislusf/seaweedfs/weed/storage"
  8. )
  9. func (vs *VolumeServer) VolumeSyncStatus(ctx context.Context, req *volume_server_pb.VolumeSyncStatusRequest) (*volume_server_pb.VolumeSyncStatusResponse, error) {
  10. v := vs.store.GetVolume(storage.VolumeId(req.VolumdId))
  11. if v == nil {
  12. return nil, fmt.Errorf("Not Found Volume Id %d", req.VolumdId)
  13. }
  14. resp := v.GetVolumeSyncStatus()
  15. glog.V(2).Infof("volume sync status %d", req.VolumdId)
  16. return resp, nil
  17. }