forked from TrueCloudLab/frostfs-node
[#1568] storage: Remove "could not/can't/failed to" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
e44b84c18c
commit
bd0197eaa8
39 changed files with 128 additions and 128 deletions
|
@ -83,7 +83,7 @@ func (c *cache) closeStorage(ctx context.Context, shrink bool) error {
|
|||
}
|
||||
if !shrink {
|
||||
if err := c.fsTree.Close(ctx); err != nil {
|
||||
return fmt.Errorf("can't close write-cache storage: %w", err)
|
||||
return fmt.Errorf("close write-cache storage: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -98,16 +98,16 @@ func (c *cache) closeStorage(ctx context.Context, shrink bool) error {
|
|||
if errors.Is(err, errIterationCompleted) {
|
||||
empty = false
|
||||
} else {
|
||||
return fmt.Errorf("failed to check write-cache items: %w", err)
|
||||
return fmt.Errorf("check write-cache items: %w", err)
|
||||
}
|
||||
}
|
||||
if err := c.fsTree.Close(ctx); err != nil {
|
||||
return fmt.Errorf("can't close write-cache storage: %w", err)
|
||||
return fmt.Errorf("close write-cache storage: %w", err)
|
||||
}
|
||||
if empty {
|
||||
err := os.RemoveAll(c.path)
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
return fmt.Errorf("failed to remove write-cache files: %w", err)
|
||||
return fmt.Errorf("remove write-cache files: %w", err)
|
||||
}
|
||||
} else {
|
||||
c.log.Info(ctx, logs.WritecacheShrinkSkippedNotEmpty)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue