prepare to register ec shard info in master

This commit is contained in:
Chris Lu
2019-05-23 00:42:28 -07:00
parent e913ee380a
commit 4659d80035
5 changed files with 65 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/storage/erasure_coding"
)
func (dn *DataNode) GetEcShards() (ret []erasure_coding.EcVolumeInfo) {
func (dn *DataNode) GetEcShards() (ret []*erasure_coding.EcVolumeInfo) {
dn.RLock()
for _, ecVolumeInfo := range dn.ecShards {
ret = append(ret, ecVolumeInfo)
@@ -12,3 +12,9 @@ func (dn *DataNode) GetEcShards() (ret []erasure_coding.EcVolumeInfo) {
dn.RUnlock()
return ret
}
func (dn *DataNode) UpdateEcShards(actualShards []*erasure_coding.EcVolumeInfo) (newShards, deletedShards []*erasure_coding.EcVolumeInfo) {
dn.ecShardsLock.Lock()
dn.ecShardsLock.Unlock()
return
}