Unbounded blob cache during restore can exhaust memory #29
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/vaultik#29
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In
internal/vaultik/restore.go, theRestoremethod uses ablobCache map[string][]bytethat grows without bound:Each downloaded blob (up to 10GB each per config default) is cached in memory. For large restores with many unique blobs, this can exhaust system memory and crash the process.
Impact
Fix
Implement an LRU cache with a configurable maximum size, evicting the least recently used blobs when the cache exceeds the limit. A reasonable default would be ~1GB or a small number of blobs.
Moved to disk cache with proper size constraints.