From 583ff31a2417c13771aa2c399a56de20170a8cf3 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Fri, 31 May 2024 09:41:57 +0200 Subject: [PATCH] doc --- .../elasticsearch/blobcache/common/SparseFileTracker.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/common/SparseFileTracker.java b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/common/SparseFileTracker.java index 197ab28a81bca..6e6a11fbddc93 100644 --- a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/common/SparseFileTracker.java +++ b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/common/SparseFileTracker.java @@ -139,9 +139,10 @@ private long computeLengthOfRanges() { } /** - * Called before reading a range from the file to ensure that this range is present. Returns a list of gaps for the caller to fill. The - * range from the file is defined by {@code range} but the listener is executed as soon as a (potentially smaller) sub range - * {@code subRange} becomes available. + * Called before reading a range from the file to ensure that this range is present. Returns a list of gaps for the caller to fill, + * unless the {@code subRange} is already present in which case the listener is executed immediately without returning gaps. The range + * from the file is defined by {@code range} but the listener is executed as soon as a (potentially smaller) sub range {@code subRange} + * becomes available. * * @param range A ByteRange that contains the (inclusive) start and (exclusive) end of the desired range * @param subRange A ByteRange that contains the (inclusive) start and (exclusive) end of the listener's range