Matthias Beyer
a07e03a25c
This is a bugfix for a bug in Store::move_entry_by_id(): The old entry was not removed after the new one was created. The bug is a bit subtle. The issue was, that the internal cache held open a reference to the old entry (as StoreEntry object) and when that object got drop()ed, the contents of the entry were written to disk, which resulted in the old entry being recreated. This patch rewrites the function to behave well. The most critical part is that we do not check whether the old entry is borrowed with `hsmap.get()` but rather `hsmap.remove()`. The trick here is that the `StoreEntry` object is dropped in the moment the check is done, clearing the cached object and flushing it to the backend (the disk). After that, we continue doing the filesystem operation and the cache is clean. 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.