forked from TrueCloudLab/frostfs-node
[#1496] node/control: Await until SetNetmapStatus() persists
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
acd5babd86
commit
d82f0d1926
3 changed files with 9 additions and 11 deletions
|
@ -421,8 +421,11 @@ func (c *cfg) updateNetMapState(ctx context.Context, stateSetter func(*nmClient.
|
|||
prm.SetKey(c.key.PublicKey().Bytes())
|
||||
stateSetter(&prm)
|
||||
|
||||
_, err := c.cfgNetmap.wrapper.UpdatePeerState(ctx, prm)
|
||||
return err
|
||||
res, err := c.cfgNetmap.wrapper.UpdatePeerState(ctx, prm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return c.cfgNetmap.wrapper.Morph().WaitTxHalt(ctx, res)
|
||||
}
|
||||
|
||||
type netInfo struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue