[#1298] writecache: Add shrink flag for Seal command

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-08-06 15:45:53 +03:00
parent 5c01bd5be8
commit 36efccd862
12 changed files with 255 additions and 187 deletions

View file

@ -71,6 +71,7 @@ type SealWriteCachePrm struct {
ShardIDs []*shard.ID
IgnoreErrors bool
RestoreMode bool
Shrink bool
}
type ShardSealResult struct {
@ -116,7 +117,7 @@ func (e *StorageEngine) SealWriteCache(ctx context.Context, prm SealWriteCachePr
return nil
}
err := sh.SealWriteCache(egCtx, shard.SealWriteCachePrm{IgnoreErrors: prm.IgnoreErrors, RestoreMode: prm.RestoreMode})
err := sh.SealWriteCache(egCtx, shard.SealWriteCachePrm{IgnoreErrors: prm.IgnoreErrors, RestoreMode: prm.RestoreMode, Shrink: prm.Shrink})
resGuard.Lock()
defer resGuard.Unlock()