OpenSearch/x-pack/plugin/searchable-snapshots
David Turner 3f2d10d8fc Permit searches to be concurrent to prewarming (#55795)
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.
2020-04-28 10:44:05 +01:00
..
qa Add GCS support for searchable snapshots (#55403) 2020-04-20 13:02:59 +02:00
src Permit searches to be concurrent to prewarming (#55795) 2020-04-28 10:44:05 +01:00
build.gradle Enable searchable snapshots for release tests (#54987) 2020-04-08 14:41:03 -07:00