Allow dynamically increasing capacity of storage #15
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
worm-blossom/bab_rs#15
Loading…
Add table
Add a link
Reference in a new issue
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?
The
StorageBackendtrait has a commented-outreserve_capacitymethod for adding more dynamically adding more capacity. The idea is that an application might want to first request a short prefix of some string, and may or may not request a larger prefix later. Optimistically reserving capacity for the full string could be too expensive, thereserve_capacitymethod would provide the solution. And implementing should be fairly simple for various backends (it definitely is simple for both the Vec-based in-memory backend and for the file-system backend to append more storage space at the end).Analogously,
SingleSliceStorehas a commented-outincrease_slice_lengthmethod stub.This issue consists of uncommenting these, implementing the
StorageBackend::reserve_capacitymethod on our storage backends, and to implementSingleSliceStore::increase_slice_lengthby callingreserve_capacity` on the storage backend (and adjusting the stored metadata).