forked from TrueCloudLab/frostfs-node
[#1731] engine: Return the amount of actually moved objects in Evacuate
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
8fc88487db
commit
3df98ce7ba
3 changed files with 28 additions and 16 deletions
|
@ -106,6 +106,13 @@ func TestEvacuateShard(t *testing.T) {
|
|||
// Second case ensures that all objects are indeed moved and available.
|
||||
checkHasObjects(t)
|
||||
|
||||
// Calling it again is OK, but all objects are already moved, so no new PUTs should be done.
|
||||
res, err = e.Evacuate(prm)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, 0, res.count)
|
||||
|
||||
checkHasObjects(t)
|
||||
|
||||
e.mtx.Lock()
|
||||
delete(e.shards, evacuateShardID)
|
||||
delete(e.shardPools, evacuateShardID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue