Skip to content

Commit c7bdfb1

Browse files
committed
Add comment why it is safe to check the number of nested fields in MapperService.merge.
1 parent 0eedc78 commit c7bdfb1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/main/java/org/elasticsearch/index/mapper/MapperService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ private synchronized DocumentMapper merge(DocumentMapper mapper, MergeReason rea
283283
fullPathObjectMappers = Collections.unmodifiableMap(fullPathObjectMappers);
284284

285285
if (reason == MergeReason.MAPPING_UPDATE) {
286+
// this check will only be performed on the master node when there is
287+
// a call to the update mapping API. For all other cases like
288+
// the master node restoring mappings from disk or data nodes
289+
// deserializing cluster state that was sent by the master node,
290+
// this check will be skipped.
286291
checkNestedFieldsLimit(fullPathObjectMappers);
287292
}
288293

0 commit comments

Comments
 (0)