@@ -205,7 +205,16 @@ public void testStaleCommitDeletionWithInvokeFlush() throws Exception {
205
205
createIndex (INDEX_NAME , remoteStoreIndexSettings (1 , 10000l , -1 ));
206
206
int numberOfIterations = randomIntBetween (5 , 15 );
207
207
indexData (numberOfIterations , true , INDEX_NAME );
208
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , METADATA ).buildAsString ();
208
+ String segmentsPathFixedPrefix = RemoteStoreSettings .CLUSTER_REMOTE_STORE_SEGMENTS_PATH_PREFIX .get (getNodeSettings ());
209
+ String shardPath = getShardLevelBlobPath (
210
+ client (),
211
+ INDEX_NAME ,
212
+ BlobPath .cleanPath (),
213
+ "0" ,
214
+ SEGMENTS ,
215
+ METADATA ,
216
+ segmentsPathFixedPrefix
217
+ ).buildAsString ();
209
218
Path indexPath = Path .of (segmentRepoPath + "/" + shardPath );
210
219
;
211
220
IndexShard indexShard = getIndexShard (dataNode , INDEX_NAME );
@@ -236,7 +245,16 @@ public void testStaleCommitDeletionWithoutInvokeFlush() throws Exception {
236
245
createIndex (INDEX_NAME , remoteStoreIndexSettings (1 , 10000l , -1 ));
237
246
int numberOfIterations = randomIntBetween (5 , 15 );
238
247
indexData (numberOfIterations , false , INDEX_NAME );
239
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , METADATA ).buildAsString ();
248
+ String segmentsPathFixedPrefix = RemoteStoreSettings .CLUSTER_REMOTE_STORE_SEGMENTS_PATH_PREFIX .get (getNodeSettings ());
249
+ String shardPath = getShardLevelBlobPath (
250
+ client (),
251
+ INDEX_NAME ,
252
+ BlobPath .cleanPath (),
253
+ "0" ,
254
+ SEGMENTS ,
255
+ METADATA ,
256
+ segmentsPathFixedPrefix
257
+ ).buildAsString ();
240
258
Path indexPath = Path .of (segmentRepoPath + "/" + shardPath );
241
259
int actualFileCount = getFileCount (indexPath );
242
260
// We also allow (numberOfIterations + 1) as index creation also triggers refresh.
@@ -247,11 +265,19 @@ public void testStaleCommitDeletionWithMinSegmentFiles_3() throws Exception {
247
265
Settings .Builder settings = Settings .builder ()
248
266
.put (RemoteStoreSettings .CLUSTER_REMOTE_INDEX_SEGMENT_METADATA_RETENTION_MAX_COUNT_SETTING .getKey (), "3" );
249
267
internalCluster ().startNode (settings );
250
-
268
+ String segmentsPathFixedPrefix = RemoteStoreSettings . CLUSTER_REMOTE_STORE_SEGMENTS_PATH_PREFIX . get ( getNodeSettings ());
251
269
createIndex (INDEX_NAME , remoteStoreIndexSettings (1 , 10000l , -1 ));
252
270
int numberOfIterations = randomIntBetween (5 , 15 );
253
271
indexData (numberOfIterations , true , INDEX_NAME );
254
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , METADATA ).buildAsString ();
272
+ String shardPath = getShardLevelBlobPath (
273
+ client (),
274
+ INDEX_NAME ,
275
+ BlobPath .cleanPath (),
276
+ "0" ,
277
+ SEGMENTS ,
278
+ METADATA ,
279
+ segmentsPathFixedPrefix
280
+ ).buildAsString ();
255
281
Path indexPath = Path .of (segmentRepoPath + "/" + shardPath );
256
282
int actualFileCount = getFileCount (indexPath );
257
283
// We also allow (numberOfIterations + 1) as index creation also triggers refresh.
@@ -271,7 +297,16 @@ public void testStaleCommitDeletionWithMinSegmentFiles_Disabled() throws Excepti
271
297
createIndex (INDEX_NAME , remoteStoreIndexSettings (1 , 10000l , -1 ));
272
298
int numberOfIterations = randomIntBetween (12 , 18 );
273
299
indexData (numberOfIterations , true , INDEX_NAME );
274
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , METADATA ).buildAsString ();
300
+ String segmentsPathFixedPrefix = RemoteStoreSettings .CLUSTER_REMOTE_STORE_SEGMENTS_PATH_PREFIX .get (getNodeSettings ());
301
+ String shardPath = getShardLevelBlobPath (
302
+ client (),
303
+ INDEX_NAME ,
304
+ BlobPath .cleanPath (),
305
+ "0" ,
306
+ SEGMENTS ,
307
+ METADATA ,
308
+ segmentsPathFixedPrefix
309
+ ).buildAsString ();
275
310
Path indexPath = Path .of (segmentRepoPath + "/" + shardPath );
276
311
;
277
312
int actualFileCount = getFileCount (indexPath );
@@ -604,8 +639,10 @@ public void testFallbackToNodeToNodeSegmentCopy() throws Exception {
604
639
indexBulk (INDEX_NAME , 50 );
605
640
flushAndRefresh (INDEX_NAME );
606
641
642
+ String segmentsPathFixedPrefix = RemoteStoreSettings .CLUSTER_REMOTE_STORE_SEGMENTS_PATH_PREFIX .get (getNodeSettings ());
607
643
// 3. Delete data from remote segment store
608
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , DATA ).buildAsString ();
644
+ String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , SEGMENTS , DATA , segmentsPathFixedPrefix )
645
+ .buildAsString ();
609
646
Path segmentDataPath = Path .of (segmentRepoPath + "/" + shardPath );
610
647
611
648
try (Stream <Path > files = Files .list (segmentDataPath )) {
@@ -844,7 +881,16 @@ public void testLocalOnlyTranslogCleanupOnNodeRestart() throws Exception {
844
881
.get ()
845
882
.getSetting (INDEX_NAME , IndexMetadata .SETTING_INDEX_UUID );
846
883
847
- String shardPath = getShardLevelBlobPath (client (), INDEX_NAME , BlobPath .cleanPath (), "0" , TRANSLOG , METADATA ).buildAsString ();
884
+ String translogPathFixedPrefix = RemoteStoreSettings .CLUSTER_REMOTE_STORE_TRANSLOG_PATH_PREFIX .get (getNodeSettings ());
885
+ String shardPath = getShardLevelBlobPath (
886
+ client (),
887
+ INDEX_NAME ,
888
+ BlobPath .cleanPath (),
889
+ "0" ,
890
+ TRANSLOG ,
891
+ METADATA ,
892
+ translogPathFixedPrefix
893
+ ).buildAsString ();
848
894
Path translogMetaDataPath = Path .of (translogRepoPath + "/" + shardPath );
849
895
850
896
try (Stream <Path > files = Files .list (translogMetaDataPath )) {
0 commit comments