imag/lib/core/libimagstore/src
Matthias Beyer 8b508fe4c3 Optimize backend impl to not hold open files
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>
2018-08-11 17:50:22 +02:00
..
file_abstraction Optimize backend impl to not hold open files 2018-08-11 17:50:22 +02:00
configuration.rs Use ok_or_else() instead of ok_or() 2018-04-25 19:15:07 +02:00
error.rs Remove unused error kinds 2018-04-30 18:54:11 +02:00
iter.rs Rewrite StoreIdIterator extensions 2018-05-01 17:44:01 +02:00
lib.rs Remove unused dependency 2018-04-24 22:16:40 +02:00
store.rs Remove "Header" extension for Value type 2018-07-19 20:58:27 +02:00
storeid.rs Remove unnecessary call 2018-06-23 21:56:03 +02:00
util.rs Remove "Header" extension for Value type 2018-07-19 20:58:27 +02:00