Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blooms): Use correct key to populate blockscache at startup (#13624)
The cache key for block directories in the blocks cache are the block's address without the directory prefix. This is how the directory is put to the LRU cache after downloading and extracting the block tarball. This PR fixes the incorrect cache key used to populate the cache from disk on startup, which contained the file system directory prefix. Since the cached item from startup is never used, it gets evicted first in case of a full cache, or due to its TTL. This causes also the underlying directory on disk to be deleted, which can however still be referenced from the correct cache key for that directory from a later download. That caused the error `getting index reader: opening series file: open /path/to/block/series: no such file or directory` when trying to query the block, because the correct cache key was still present. Signed-off-by: Christian Haudum <[email protected]> (cherry picked from commit 2624a4b)
- Loading branch information