Skip to content

Commit

Permalink
Use the unsafe future for read single region
Browse files Browse the repository at this point in the history
We need to use the unsafe future to block on the same thread pool
similar to read multi regions.
  • Loading branch information
Tim-Brooks committed May 28, 2024
1 parent f73fedc commit 486cfb8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,9 @@ private int readSingleRegion(
RangeMissingHandler writer,
int region
) throws InterruptedException, ExecutionException {
final PlainActionFuture<Integer> readFuture = new PlainActionFuture<>();
final PlainActionFuture<Integer> readFuture = new UnsafePlainActionFuture<>(
BlobStoreRepository.STATELESS_SHARD_PREWARMING_THREAD_NAME
);
final CacheFileRegion fileRegion = get(cacheKey, length, region);
final long regionStart = getRegionStart(region);
fileRegion.populateAndRead(
Expand Down

0 comments on commit 486cfb8

Please sign in to comment.