Skip to content

Commit d70b090

Browse files
authored
Reduce memory usage in SimpleClusterStateIT#testLargeClusterStatePublishing (elastic#73773)
In order to produce a large cluster state this test was creating 1000s of text fields for index mappings. The in memory representation for these mappings can consume all the heap causing OOMs. This commit changes the mapping type for a boolean that's more lightweight. Closes elastic#73050
1 parent dc60a38 commit d70b090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/cluster/SimpleClusterStateIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public void testLargeClusterStatePublishing() throws Exception {
215215
int counter = 0;
216216
int numberOfFields = 0;
217217
while (true) {
218-
mapping.startObject(UUIDs.randomBase64UUID()).field("type", "text").endObject();
218+
mapping.startObject(UUIDs.randomBase64UUID()).field("type", "boolean").endObject();
219219
counter += 10; // each field is about 10 bytes, assuming compression in place
220220
numberOfFields++;
221221
if (counter > estimatedBytesSize) {

0 commit comments

Comments
 (0)