forked from TrueCloudLab/frostfs-node
[#1333] services/control: Allow to synchronize local trees
Do not check that a node indeed belongs to the container, because the synchronization will fail in this case anyway. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
0dc1a4e336
commit
bfdd68dcb3
13 changed files with 836 additions and 180 deletions
|
@ -16,6 +16,7 @@ const (
|
|||
rpcSetShardMode = "SetShardMode"
|
||||
rpcDumpShard = "DumpShard"
|
||||
rpcRestoreShard = "RestoreShard"
|
||||
rpcSynchronizeTree = "SynchronizeTree"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -172,3 +173,16 @@ func RestoreShard(cli *client.Client, req *RestoreShardRequest, opts ...client.C
|
|||
|
||||
return wResp.RestoreShardResponse, nil
|
||||
}
|
||||
|
||||
// SynchronizeTree executes ControlService.SynchronizeTree RPC.
|
||||
func SynchronizeTree(cli *client.Client, req *SynchronizeTreeRequest, opts ...client.CallOption) (*SynchronizeTreeResponse, error) {
|
||||
wResp := &synchronizeTreeResponseWrapper{new(SynchronizeTreeResponse)}
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcSynchronizeTree), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return wResp.SynchronizeTreeResponse, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue