3f2d10d8fc
Today when prewarming a searchable snapshot we use the `SparseFileTracker` to lock each (part of a) snapshotted blob, blocking any other readers from accessing this data until the whole part is available. This commit changes this strategy: instead we optimistically start to download the blob without any locking, and then lock much smaller ranges after each individual `read()` call. This may mean that some bytes are downloaded twice, but reduces the time that other readers may need to wait before the data they need is available. As a best-effort optimisation we try to request the smallest possible single range of missing bytes in the part by first checking how many of the initial and terminal bytes of the part are already present in cache. In particular if the part is already fully cached before prewarming then this check means we skip the part entirely. |
||
---|---|---|
.. | ||
qa | ||
src | ||
build.gradle |