forked from TrueCloudLab/frostfs-node
Dmitrii Stepanov
f1c7905263
Different DBs can be rebuild concurrently. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
26 lines
486 B
Go
26 lines
486 B
Go
package common
|
|
|
|
import (
|
|
"context"
|
|
|
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
|
)
|
|
|
|
type RebuildRes struct {
|
|
ObjectsMoved uint64
|
|
FilesRemoved uint64
|
|
}
|
|
|
|
type RebuildPrm struct {
|
|
MetaStorage MetaStorage
|
|
WorkerLimiter ConcurrentWorkersLimiter
|
|
}
|
|
|
|
type MetaStorage interface {
|
|
UpdateStorageID(ctx context.Context, addr oid.Address, storageID []byte) error
|
|
}
|
|
|
|
type ConcurrentWorkersLimiter interface {
|
|
AcquireWorkSlot(ctx context.Context) error
|
|
ReleaseWorkSlot()
|
|
}
|