forked from TrueCloudLab/frostfs-node
[#1298] writecache: Add restore-mode
flag for Seal command
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
8e51d7849a
commit
5c01bd5be8
11 changed files with 238 additions and 205 deletions
|
@ -70,6 +70,7 @@ func (e *StorageEngine) FlushWriteCache(ctx context.Context, p FlushWriteCachePr
|
|||
type SealWriteCachePrm struct {
|
||||
ShardIDs []*shard.ID
|
||||
IgnoreErrors bool
|
||||
RestoreMode bool
|
||||
}
|
||||
|
||||
type ShardSealResult struct {
|
||||
|
@ -88,6 +89,7 @@ func (e *StorageEngine) SealWriteCache(ctx context.Context, prm SealWriteCachePr
|
|||
trace.WithAttributes(
|
||||
attribute.Int("shard_id_count", len(prm.ShardIDs)),
|
||||
attribute.Bool("ignore_errors", prm.IgnoreErrors),
|
||||
attribute.Bool("restore_mode", prm.RestoreMode),
|
||||
))
|
||||
defer span.End()
|
||||
|
||||
|
@ -114,7 +116,7 @@ func (e *StorageEngine) SealWriteCache(ctx context.Context, prm SealWriteCachePr
|
|||
return nil
|
||||
}
|
||||
|
||||
err := sh.SealWriteCache(egCtx, shard.SealWriteCachePrm{IgnoreErrors: prm.IgnoreErrors})
|
||||
err := sh.SealWriteCache(egCtx, shard.SealWriteCachePrm{IgnoreErrors: prm.IgnoreErrors, RestoreMode: prm.RestoreMode})
|
||||
|
||||
resGuard.Lock()
|
||||
defer resGuard.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue