[#191] engine: Allow to remove redundant object copies

RemoveDuplicates() removes all duplicate object copies stored on
multiple shards. All shards are processed and the command tries to leave
a copy on the best shard according to HRW.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-03-30 14:49:15 +03:00 committed by Gitea
parent cb172e73a6
commit dbc3811ff4
4 changed files with 358 additions and 5 deletions

View file

@ -17,6 +17,8 @@ import (
type StorageEngine struct {
*cfg
removeDuplicatesInProgress atomic.Bool
mtx *sync.RWMutex
shards map[string]hashedShard