Skip to content

[mappings] partially parsed documents can cause mapping loss #9851

@brwe

Description

@brwe

When a document is parsed only halfway but parsing exits with a MapperParsingException, the fields that were parsed till then are still in the local DocumentMapper but never added to the cluster state. Once the nodes are restarted the mapping is gone. I wore a test for it here brwe@52cd27c#diff-defbaaff93b959a2f9a93e7167f6f345R246

We can potentailly fix this by also update the mapping on MapperParsingExceptions (brwe@52cd27c#diff-9669e07f0556311d187e534e321a0393R422) but we would probably need to check first if the mapper was actually changed, otherwise we might end with one update for each Exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions