Matthias Beyer
8b508fe4c3
This patch changes the filesystem-backend implementation of libimagstore to open files on each read/write rather than holding the file handle in memory at all times. Whenever a lot of imag store entries are read into memory, the imag process may ran out of file descriptors. With this patch applied, a `Store::get()` call on an entry which is not yet in the store cache would cause the file to be read, but the FD being dropped after that. Likewise, a `Store::update()` (which is also called if the imag entry is dropped) would re-open the file on the filesystem and write the contents from the imag store cache back to the file. With this patch, opening hundrets or thousands of imag entries should be no problem anymore, only the available memory should be a limit then. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
Cargo.toml | ||
README.md |
libimagstore
The store is the heart of everything. Here lives the data, the complexity and the performance bottleneck.
The store offeres read/write access to all entries.
The store itself does not offer functionality, but has a commandline interface "imag-store" which can do basic things with the store.
Long-term TODO
- Merge with
libimagrt