@@ -93,16 +93,16 @@ public void testGetAdditionalIndexSettings() throws Exception {
9393 }
9494 """ ;
9595 Settings .Builder additionalSettings = builder ();
96- provider .provideAdditionalMetadata (
96+ provider .provideAdditionalSettings (
9797 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
9898 dataStreamName ,
9999 IndexMode .TIME_SERIES ,
100100 projectMetadata ,
101101 now ,
102102 settings ,
103103 List .of (new CompressedXContent (mapping )),
104- additionalSettings ,
105- ( k , v ) -> {}
104+ IndexVersion . current () ,
105+ additionalSettings
106106 );
107107 Settings result = additionalSettings .build ();
108108 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -147,16 +147,16 @@ public void testGetAdditionalIndexSettingsIndexRoutingPathAlreadyDefined() throw
147147 }
148148 """ ;
149149 Settings .Builder additionalSettings = builder ();
150- provider .provideAdditionalMetadata (
150+ provider .provideAdditionalSettings (
151151 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
152152 dataStreamName ,
153153 IndexMode .TIME_SERIES ,
154154 projectMetadata ,
155155 now ,
156156 settings ,
157157 List .of (new CompressedXContent (mapping )),
158- additionalSettings ,
159- ( k , v ) -> {}
158+ IndexVersion . current () ,
159+ additionalSettings
160160 );
161161 Settings result = additionalSettings .build ();
162162 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -221,16 +221,16 @@ public void testGetAdditionalIndexSettingsMappingsMerging() throws Exception {
221221 }
222222 """ ;
223223 Settings .Builder additionalSettings = builder ();
224- provider .provideAdditionalMetadata (
224+ provider .provideAdditionalSettings (
225225 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
226226 dataStreamName ,
227227 IndexMode .TIME_SERIES ,
228228 projectMetadata ,
229229 now ,
230230 settings ,
231231 List .of (new CompressedXContent (mapping1 ), new CompressedXContent (mapping2 ), new CompressedXContent (mapping3 )),
232- additionalSettings ,
233- ( k , v ) -> {}
232+ IndexVersion . current () ,
233+ additionalSettings
234234 );
235235 Settings result = additionalSettings .build ();
236236 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -255,16 +255,16 @@ public void testGetAdditionalIndexSettingsNoMappings() {
255255 Instant now = Instant .now ().truncatedTo (ChronoUnit .SECONDS );
256256 Settings settings = Settings .EMPTY ;
257257 Settings .Builder additionalSettings = builder ();
258- provider .provideAdditionalMetadata (
258+ provider .provideAdditionalSettings (
259259 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
260260 dataStreamName ,
261261 IndexMode .TIME_SERIES ,
262262 projectMetadata ,
263263 now ,
264264 settings ,
265265 List .of (),
266- additionalSettings ,
267- ( k , v ) -> {}
266+ IndexVersion . current () ,
267+ additionalSettings
268268 );
269269 Settings result = additionalSettings .build ();
270270 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -284,16 +284,16 @@ public void testGetAdditionalIndexSettingsLookAheadTime() throws Exception {
284284 TimeValue lookAheadTime = TimeValue .timeValueMinutes (30 );
285285 Settings settings = builder ().put ("index.mode" , "time_series" ).put ("index.look_ahead_time" , lookAheadTime .getStringRep ()).build ();
286286 Settings .Builder additionalSettings = builder ();
287- provider .provideAdditionalMetadata (
287+ provider .provideAdditionalSettings (
288288 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
289289 dataStreamName ,
290290 IndexMode .TIME_SERIES ,
291291 projectMetadata ,
292292 now ,
293293 settings ,
294294 List .of (new CompressedXContent ("{}" )),
295- additionalSettings ,
296- ( k , v ) -> {}
295+ IndexVersion . current () ,
296+ additionalSettings
297297 );
298298 Settings result = additionalSettings .build ();
299299 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -313,16 +313,16 @@ public void testGetAdditionalIndexSettingsLookBackTime() throws Exception {
313313 TimeValue lookBackTime = TimeValue .timeValueHours (12 );
314314 Settings settings = builder ().put ("index.mode" , "time_series" ).put ("index.look_back_time" , lookBackTime .getStringRep ()).build ();
315315 Settings .Builder additionalSettings = builder ();
316- provider .provideAdditionalMetadata (
316+ provider .provideAdditionalSettings (
317317 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
318318 dataStreamName ,
319319 IndexMode .TIME_SERIES ,
320320 projectMetadata ,
321321 now ,
322322 settings ,
323323 List .of (new CompressedXContent ("{}" )),
324- additionalSettings ,
325- ( k , v ) -> {}
324+ IndexVersion . current () ,
325+ additionalSettings
326326 );
327327 Settings result = additionalSettings .build ();
328328 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -349,16 +349,16 @@ public void testGetAdditionalIndexSettingsDataStreamAlreadyCreated() throws Exce
349349 Instant now = sixHoursAgo .plus (6 , ChronoUnit .HOURS );
350350 Settings settings = Settings .EMPTY ;
351351 Settings .Builder additionalSettings = builder ();
352- provider .provideAdditionalMetadata (
352+ provider .provideAdditionalSettings (
353353 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
354354 dataStreamName ,
355355 IndexMode .TIME_SERIES ,
356356 projectMetadata ,
357357 now ,
358358 settings ,
359359 List .of (new CompressedXContent ("{}" )),
360- additionalSettings ,
361- ( k , v ) -> {}
360+ IndexVersion . current () ,
361+ additionalSettings
362362 );
363363 var result = additionalSettings .build ();
364364 assertThat (result .size (), equalTo (2 ));
@@ -389,16 +389,16 @@ public void testGetAdditionalIndexSettingsDataStreamAlreadyCreatedTimeSettingsMi
389389 Settings settings = Settings .EMPTY ;
390390 Exception e = expectThrows (
391391 IllegalStateException .class ,
392- () -> provider .provideAdditionalMetadata (
392+ () -> provider .provideAdditionalSettings (
393393 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
394394 dataStreamName ,
395395 IndexMode .TIME_SERIES ,
396396 projectMetadata ,
397397 now ,
398398 settings ,
399399 null ,
400- builder (),
401- ( k , v ) -> {}
400+ IndexVersion . current (),
401+ builder ()
402402 )
403403 );
404404 assertThat (
@@ -418,16 +418,16 @@ public void testGetAdditionalIndexSettingsNonTsdbTemplate() {
418418
419419 Settings settings = Settings .EMPTY ;
420420 Settings .Builder additionalSettings = builder ();
421- provider .provideAdditionalMetadata (
421+ provider .provideAdditionalSettings (
422422 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
423423 dataStreamName ,
424424 null ,
425425 projectMetadata ,
426426 Instant .ofEpochMilli (1L ),
427427 settings ,
428428 null ,
429- additionalSettings ,
430- ( k , v ) -> {}
429+ IndexVersion . current () ,
430+ additionalSettings
431431 );
432432 Settings result = additionalSettings .build ();
433433 assertThat (result .size (), equalTo (0 ));
@@ -444,16 +444,16 @@ public void testGetAdditionalIndexSettingsMigrateToTsdb() {
444444
445445 Settings settings = Settings .EMPTY ;
446446 Settings .Builder additionalSettings = builder ();
447- provider .provideAdditionalMetadata (
447+ provider .provideAdditionalSettings (
448448 DataStream .getDefaultBackingIndexName (dataStreamName , 2 ),
449449 dataStreamName ,
450450 IndexMode .TIME_SERIES ,
451451 projectMetadata ,
452452 now ,
453453 settings ,
454454 List .of (),
455- additionalSettings ,
456- ( k , v ) -> {}
455+ IndexVersion . current () ,
456+ additionalSettings
457457 );
458458 Settings result = additionalSettings .build ();
459459 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -477,16 +477,16 @@ public void testGetAdditionalIndexSettingsDowngradeFromTsdb() {
477477 );
478478
479479 Settings .Builder additionalSettings = builder ();
480- provider .provideAdditionalMetadata (
480+ provider .provideAdditionalSettings (
481481 DataStream .getDefaultBackingIndexName (dataStreamName , 2 ),
482482 dataStreamName ,
483483 null ,
484484 projectMetadata ,
485485 Instant .ofEpochMilli (1L ),
486486 Settings .EMPTY ,
487487 List .of (),
488- additionalSettings ,
489- ( k , v ) -> {}
488+ IndexVersion . current () ,
489+ additionalSettings
490490 );
491491 Settings result = additionalSettings .build ();
492492 assertThat (result .size (), equalTo (0 ));
@@ -954,16 +954,16 @@ private Settings generateTsdbSettings(String mapping, Instant now) throws IOExce
954954 Settings settings = Settings .EMPTY ;
955955
956956 Settings .Builder additionalSettings = builder ();
957- provider .provideAdditionalMetadata (
957+ provider .provideAdditionalSettings (
958958 DataStream .getDefaultBackingIndexName (dataStreamName , 1 ),
959959 dataStreamName ,
960960 IndexMode .TIME_SERIES ,
961961 projectMetadata ,
962962 now ,
963963 settings ,
964964 List .of (new CompressedXContent (mapping )),
965- additionalSettings ,
966- ( k , v ) -> {}
965+ IndexVersion . current () ,
966+ additionalSettings
967967 );
968968 var result = additionalSettings .build ();
969969 // The index.time_series.end_time setting requires index.mode to be set to time_series adding it here so that we read this setting:
@@ -1002,7 +1002,7 @@ private Settings onUpdateMappings(String routingPath, String dimensions, String
10021002 documentMapper = mapperService .documentMapper ();
10031003 }
10041004 Settings .Builder additionalSettings = builder ();
1005- provider .onUpdateMappings (im , documentMapper , additionalSettings , ( k , v ) -> {} );
1005+ provider .onUpdateMappings (im , documentMapper , additionalSettings );
10061006 return additionalSettings .build ();
10071007 }
10081008
0 commit comments