forked from TrueCloudLab/frostfs-node
[#1298] writecache: Add shrink
flag for Seal command
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
5c01bd5be8
commit
36efccd862
12 changed files with 255 additions and 187 deletions
|
@ -61,6 +61,7 @@ func (s *Shard) FlushWriteCache(ctx context.Context, p FlushWriteCachePrm) error
|
|||
type SealWriteCachePrm struct {
|
||||
IgnoreErrors bool
|
||||
RestoreMode bool
|
||||
Shrink bool
|
||||
}
|
||||
|
||||
// SealWriteCache flushes all data from the write-cache and moves it to degraded read only mode.
|
||||
|
@ -87,5 +88,5 @@ func (s *Shard) SealWriteCache(ctx context.Context, p SealWriteCachePrm) error {
|
|||
return ErrDegradedMode
|
||||
}
|
||||
|
||||
return s.writeCache.Seal(ctx, writecache.SealPrm{IgnoreErrors: p.IgnoreErrors, RestoreMode: p.RestoreMode})
|
||||
return s.writeCache.Seal(ctx, writecache.SealPrm{IgnoreErrors: p.IgnoreErrors, RestoreMode: p.RestoreMode, Shrink: p.Shrink})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue