elasticsearch/elasticsearch — pull request #8413 by bleskes (2014-11-09 21:28:13+00:00)
Title: Internal: extend refresh-mapping logic to the _default_ type

When data nodes receive mapping updates from the master, the parse it and merge it into their own in memory representation (if there). If this results in different bytes then the master sent, the nodes will send a refresh-mapping command to indicate to the master that it's byte level storage of the mapping should be refreshed via the document mappers. This comes handy when the mapping format has changed, in a backwards compatible manner, and we want to make sure we can still rely on the bytes to identify changes. An example of such a change can be seen at #4760.

This commit extends the logic to include the `_default_` type, which was never refreshed before. In some unlucky scenarios, this called the _default_ mapping to be parsed with every cluster state update.

PS - I haven't found a good way to test this. Suggestions are welcome.