[#250] control: remove DumpShard
and RestoreShard
RPC
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
We have `Evacuate` with a cleaner interface. Also, remove them from CLI and engine. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
070154d506
commit
8466894fdf
20 changed files with 325 additions and 2466 deletions
|
@ -13,8 +13,6 @@ const (
|
|||
rpcDropObjects = "DropObjects"
|
||||
rpcListShards = "ListShards"
|
||||
rpcSetShardMode = "SetShardMode"
|
||||
rpcDumpShard = "DumpShard"
|
||||
rpcRestoreShard = "RestoreShard"
|
||||
rpcSynchronizeTree = "SynchronizeTree"
|
||||
rpcEvacuateShard = "EvacuateShard"
|
||||
rpcFlushCache = "FlushCache"
|
||||
|
@ -128,32 +126,6 @@ func SetShardMode(
|
|||
return wResp.m, nil
|
||||
}
|
||||
|
||||
// DumpShard executes ControlService.DumpShard RPC.
|
||||
func DumpShard(cli *client.Client, req *DumpShardRequest, opts ...client.CallOption) (*DumpShardResponse, error) {
|
||||
wResp := &dumpShardResponseWrapper{new(DumpShardResponse)}
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcDumpShard), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return wResp.DumpShardResponse, nil
|
||||
}
|
||||
|
||||
// RestoreShard executes ControlService.DumpShard RPC.
|
||||
func RestoreShard(cli *client.Client, req *RestoreShardRequest, opts ...client.CallOption) (*RestoreShardResponse, error) {
|
||||
wResp := &restoreShardResponseWrapper{new(RestoreShardResponse)}
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcRestoreShard), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
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)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue