wusong
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
0 additions and
6 deletions
-
weed/server/master_grpc_server_volume.go
|
@ -309,13 +309,7 @@ func (ms *MasterServer) VolumeMarkReadonly(ctx context.Context, req *master_pb.V |
|
|
replicaPlacement, _ := super_block.NewReplicaPlacementFromByte(byte(req.ReplicaPlacement)) |
|
|
replicaPlacement, _ := super_block.NewReplicaPlacementFromByte(byte(req.ReplicaPlacement)) |
|
|
vl := ms.Topo.GetVolumeLayout(req.Collection, replicaPlacement, needle.LoadTTLFromUint32(req.Ttl), types.ToDiskType(req.DiskType)) |
|
|
vl := ms.Topo.GetVolumeLayout(req.Collection, replicaPlacement, needle.LoadTTLFromUint32(req.Ttl), types.ToDiskType(req.DiskType)) |
|
|
dataNodes := ms.Topo.Lookup(req.Collection, needle.VolumeId(req.VolumeId)) |
|
|
dataNodes := ms.Topo.Lookup(req.Collection, needle.VolumeId(req.VolumeId)) |
|
|
if req.IsReadonly { |
|
|
|
|
|
for _, dn := range dataNodes { |
|
|
|
|
|
if dn.Ip == req.Ip && dn.Port == int(req.Port) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
for _, dn := range dataNodes { |
|
|
for _, dn := range dataNodes { |
|
|
if dn.Ip == req.Ip && dn.Port == int(req.Port) { |
|
|
if dn.Ip == req.Ip && dn.Port == int(req.Port) { |
|
|
if req.IsReadonly { |
|
|
if req.IsReadonly { |
|
|