Skip to content

Commit

Permalink
Add rolling upgrade test for the index.mapper.dynamic index setting bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Jun 3, 2024
1 parent e2ee2a0 commit f84bcfd
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
import org.elasticsearch.Version;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.support.XContentMapValues;

import java.io.IOException;

public class MappingIT extends AbstractRollingTestCase {
/**
* Create a mapping that explicitly disables the _all field (possible in 6x, see #37429)
Expand Down Expand Up @@ -48,4 +51,18 @@ public void testAllFieldDisable6x() throws Exception {
break;
}
}

public void testMapperDynamicIndexSetting() throws IOException {
switch (CLUSTER_TYPE) {
case OLD:
createIndex("my-index", Settings.EMPTY);
updateIndexSettings("my-index", Settings.builder().put("index.mapper.dynamic", true));
break;
case MIXED:
case UPGRADED:
ensureGreen("my-index");
break;
}
}

}

0 comments on commit f84bcfd

Please sign in to comment.