Restore: blobCache grows unboundedly, will OOM with large backups #11

Open
opened 2026-02-08 17:16:25 +01:00 by clawbot · 0 comments
Collaborator

In restore.go Restore(), downloaded+decrypted blobs are cached in memory:

blobCache := make(map[string][]byte)
...
blobCache[blobHashStr] = blobData

This cache is never evicted. For large restores with many blobs (each up to 10GB per config), this will exhaust memory. Should implement an LRU cache with a configurable size limit, or write cached blobs to temp files.

Ref: parent issue #1

In `restore.go` `Restore()`, downloaded+decrypted blobs are cached in memory: ```go blobCache := make(map[string][]byte) ... blobCache[blobHashStr] = blobData ``` This cache is never evicted. For large restores with many blobs (each up to 10GB per config), this will exhaust memory. Should implement an LRU cache with a configurable size limit, or write cached blobs to temp files. Ref: parent issue #1
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/vaultik#11
No description provided.