Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28071

FTS index language override parsing errors not handled correctly for oplog idempotency

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.4
    • Affects Version/s: None
    • Component/s: Querying, Replication
    • None
    • Fully Compatible
    • ALL
    • Query 2017-03-06
    • 52

      Consider the following sequence of operations:

      1. db.c.insert({_id: 1, x: "words to index", language: 1});
      2. db.c.update({_id: 1}, {$unset: {language: 1}});
      3. db.c.createIndex({x: "text"});

      The originally inserted document cannot be indexed by the text index, since its language field is not specified as a string. This is all fine on the replica set primary node, since the bad language field is removed before the index is created. A secondary, however, might have to replay these oplog entries after cloning the index. In this case, the insertion will fail with "Location17261: found language override field in document with non-string type", causing the secondary to trip a fatal assertion.

      In order to handle cases like this, secondary nodes are expected to relax indexing constraints during oplog application, since constraint violations will be resolved once a consistent point in the oplog is reached. However, the secondary is not properly relaxing text index constraints related to parsing of the language.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: