Skip to content

Commit

Permalink
We can still prune though we might have nothing to evict
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll committed Aug 14, 2024
1 parent 6d2f104 commit 06e7569
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ private static FileCachedIndexInput createIndexInput(FileCache fileCache, Stream
// This local file cache is ref counted and may not strictly enforce configured capacity.
// If we find available capacity is exceeded, deny further BlobFetchRequests.
if (fileCache.capacity() < fileCache.usage().usage() + request.getBlobLength() && !fileCache.canOverflow()) {
fileCache.prune();
throw new IOException("Local file cache capacity exceeded - BlobFetchRequest failed: " + request.getFilePath());
}
if (Files.exists(request.getFilePath()) == false) {
Expand Down

0 comments on commit 06e7569

Please sign in to comment.