@@ -68,14 +68,14 @@ public Directory newFSDirectory(Path location, LockFactory lockFactory, IndexSet
6868 public Directory newDirectory (IndexSettings indexSettings , ShardPath path ) throws IOException {
6969 String repositoryName = indexSettings .getRemoteStoreRepository ();
7070 String indexUUID = indexSettings .getIndex ().getUUID ();
71-
7271 return newDirectory (
7372 repositoryName ,
7473 indexUUID ,
7574 path .getShardId (),
7675 indexSettings .getRemoteStorePathStrategy (),
7776 null ,
78- RemoteStoreUtils .isServerSideEncryptionEnabledIndex (indexSettings .getIndexMetadata ())
77+ RemoteStoreUtils .isServerSideEncryptionEnabledIndex (indexSettings .getIndexMetadata ()),
78+ indexSettings .isWarmIndex ()
7979 );
8080 }
8181
@@ -101,6 +101,18 @@ public Directory newDirectory(
101101 RemoteStorePathStrategy pathStrategy ,
102102 String indexFixedPrefix ,
103103 boolean isServerSideEncryptionEnabled
104+ ) throws IOException {
105+ return newDirectory (repositoryName , indexUUID , shardId , pathStrategy , indexFixedPrefix , isServerSideEncryptionEnabled , false );
106+ }
107+
108+ public Directory newDirectory (
109+ String repositoryName ,
110+ String indexUUID ,
111+ ShardId shardId ,
112+ RemoteStorePathStrategy pathStrategy ,
113+ String indexFixedPrefix ,
114+ boolean isServerSideEncryptionEnabled ,
115+ boolean isWarmIndex
104116 ) throws IOException {
105117 assert Objects .nonNull (pathStrategy );
106118 // We should be not calling close for repository.
@@ -128,7 +140,9 @@ public Directory newDirectory(
128140 blobStoreRepository .blobStore (isServerSideEncryptionEnabled ).blobContainer (dataPath ),
129141 blobStoreRepository ::maybeRateLimitRemoteUploadTransfers ,
130142 blobStoreRepository ::maybeRateLimitLowPriorityRemoteUploadTransfers ,
131- blobStoreRepository ::maybeRateLimitRemoteDownloadTransfers ,
143+ isWarmIndex
144+ ? blobStoreRepository ::maybeRateLimitRemoteDownloadTransfersForWarm
145+ : blobStoreRepository ::maybeRateLimitRemoteDownloadTransfers ,
132146 blobStoreRepository ::maybeRateLimitLowPriorityDownloadTransfers ,
133147 pendingDownloadMergedSegments
134148 );
0 commit comments