don't add the same object twice under rare cases where multiple threads are introducing the same new dynamic object
This commit is contained in:
parent
96710fde24
commit
879191c435
|
@ -363,8 +363,7 @@ public class XContentObjectMapper implements XContentMapper, XContentIncludeInAl
|
|||
objectMapper = mappers.get(currentFieldName);
|
||||
if (objectMapper != null) {
|
||||
objectMapper.parse(context);
|
||||
}
|
||||
|
||||
} else {
|
||||
BuilderContext builderContext = new BuilderContext(context.path());
|
||||
objectMapper = XContentMapperBuilders.object(currentFieldName).enabled(true)
|
||||
.dynamic(dynamic).pathType(pathType).dateTimeFormatter(dateTimeFormatters).build(builderContext);
|
||||
|
@ -372,6 +371,7 @@ public class XContentObjectMapper implements XContentMapper, XContentIncludeInAl
|
|||
objectMapper.parse(context);
|
||||
context.addedMapper();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// not dynamic, read everything up to end object
|
||||
context.parser().skipChildren();
|
||||
|
|
Loading…
Reference in New Issue