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.

21 lines
531 B

  1. package storage
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/pb/master_pb"
  4. )
  5. func (s *Store) CollectErasureCodingHeartbeat() *master_pb.Heartbeat {
  6. var ecShardMessages []*master_pb.VolumeEcShardInformationMessage
  7. for _, location := range s.Locations {
  8. location.ecShardsLock.RLock()
  9. for _, ecShards := range location.ecShards {
  10. ecShardMessages = append(ecShardMessages, ecShards.ToVolumeInformationMessage()...)
  11. }
  12. location.ecShardsLock.RUnlock()
  13. }
  14. return &master_pb.Heartbeat{
  15. EcShards: ecShardMessages,
  16. }
  17. }