Skip to content

Commit

Permalink
Add comment why it is safe to check the number of nested fields in Ma…
Browse files Browse the repository at this point in the history
…pperService.merge.
  • Loading branch information
jpountz committed Mar 29, 2016
1 parent 0eedc78 commit c7bdfb1
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -283,6 +283,11 @@ private synchronized DocumentMapper merge(DocumentMapper mapper, MergeReason rea
fullPathObjectMappers = Collections.unmodifiableMap(fullPathObjectMappers);

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

Expand Down

0 comments on commit c7bdfb1

Please sign in to comment.