From 486cfb87332312e8ebff57aa20bc740481020ef7 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Tue, 28 May 2024 17:22:13 -0600 Subject: [PATCH] Use the unsafe future for read single region We need to use the unsafe future to block on the same thread pool similar to read multi regions. --- .../blobcache/shared/SharedBlobCacheService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java index c5ef1d7c2bf1d..46cc2ee75bf3b 100644 --- a/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java +++ b/x-pack/plugin/blob-cache/src/main/java/org/elasticsearch/blobcache/shared/SharedBlobCacheService.java @@ -1116,7 +1116,9 @@ private int readSingleRegion( RangeMissingHandler writer, int region ) throws InterruptedException, ExecutionException { - final PlainActionFuture readFuture = new PlainActionFuture<>(); + final PlainActionFuture readFuture = new UnsafePlainActionFuture<>( + BlobStoreRepository.STATELESS_SHARD_PREWARMING_THREAD_NAME + ); final CacheFileRegion fileRegion = get(cacheKey, length, region); final long regionStart = getRegionStart(region); fileRegion.populateAndRead(