Add active directory management for snapshot operations
Introduced `GetActiveDir` and `CleanActiveDir` methods in the blob store to manage a dedicated directory for active snapshot operations. This ensures a clean working state before starting new operations and prevents conflicts. Updated related logic in snapshot creation and restoration to utilize the active directory.
This commit is contained in:
@ -71,4 +71,11 @@ type BlobStore interface {
|
||||
// Это может быть полезно для функций пакета archive, которые работают с путями.
|
||||
// Возвращает agate.ErrNotFound, если блоб не найден.
|
||||
GetBlobPath(ctx context.Context, snapshotID string) (string, error)
|
||||
|
||||
// GetActiveDir возвращает путь к директории для активных операций (создание и восстановление).
|
||||
GetActiveDir() string
|
||||
|
||||
// CleanActiveDir очищает директорию для активных операций.
|
||||
// Это полезно перед началом новых операций, чтобы избежать конфликтов.
|
||||
CleanActiveDir(ctx context.Context) error
|
||||
}
|
||||
|
Reference in New Issue
Block a user