add other replica locations when assigning volumes

This commit is contained in:
Chris Lu
2021-09-05 23:32:25 -07:00
parent 7a13816e94
commit e93d4935e3
5 changed files with 519 additions and 406 deletions

View File

@@ -31,6 +31,11 @@ func (dnll *VolumeLocationList) Head() *DataNode {
return dnll.list[0]
}
func (dnll *VolumeLocationList) Rest() []*DataNode {
//mark first node as master volume
return dnll.list[1:]
}
func (dnll *VolumeLocationList) Length() int {
if dnll == nil {
return 0