@@ -1029,38 +1029,6 @@ public void testCanReadOldCorruptionMarker() throws IOException {
1029
1029
store .close ();
1030
1030
}
1031
1031
1032
- public void testEnsureIndexHasHistoryUUID () throws IOException {
1033
- final ShardId shardId = new ShardId ("index" , "_na_" , 1 );
1034
- try (Store store = new Store (shardId , INDEX_SETTINGS , StoreTests .newDirectory (random ()), new DummyShardLock (shardId ))) {
1035
-
1036
- store .createEmpty (Version .LATEST );
1037
-
1038
- // remove the history uuid
1039
- IndexWriterConfig iwc = new IndexWriterConfig (null )
1040
- .setCommitOnClose (false )
1041
- // we don't want merges to happen here - we call maybe merge on the engine
1042
- // later once we stared it up otherwise we would need to wait for it here
1043
- // we also don't specify a codec here and merges should use the engines for this index
1044
- .setMergePolicy (NoMergePolicy .INSTANCE )
1045
- .setOpenMode (IndexWriterConfig .OpenMode .APPEND );
1046
- try (IndexWriter writer = new IndexWriter (store .directory (), iwc )) {
1047
- Map <String , String > newCommitData = new HashMap <>();
1048
- for (Map .Entry <String , String > entry : writer .getLiveCommitData ()) {
1049
- if (entry .getKey ().equals (Engine .HISTORY_UUID_KEY ) == false ) {
1050
- newCommitData .put (entry .getKey (), entry .getValue ());
1051
- }
1052
- }
1053
- writer .setLiveCommitData (newCommitData .entrySet ());
1054
- writer .commit ();
1055
- }
1056
-
1057
- store .ensureIndexHasHistoryUUID ();
1058
-
1059
- SegmentInfos segmentInfos = Lucene .readSegmentInfos (store .directory ());
1060
- assertThat (segmentInfos .getUserData (), hasKey (Engine .HISTORY_UUID_KEY ));
1061
- }
1062
- }
1063
-
1064
1032
public void testHistoryUUIDCanBeForced () throws IOException {
1065
1033
final ShardId shardId = new ShardId ("index" , "_na_" , 1 );
1066
1034
try (Store store = new Store (shardId , INDEX_SETTINGS , StoreTests .newDirectory (random ()), new DummyShardLock (shardId ))) {
0 commit comments