[SERVER-28071] FTS index language override parsing errors not handled correctly for oplog idempotency Created: 22/Feb/17  Updated: 08/Dec/17  Resolved: 23/Feb/17

Status: Closed
Project: Core Server
Component/s: Querying, Replication
Affects Version/s: None
Fix Version/s: 3.5.4

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-32225 Initial sync should ignore multiple t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-03-06
Participants:
Linked BF Score: 52

 Description   

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.



 Comments   
Comment by Githook User [ 23/Feb/17 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-28071 add missing FTS indexing error codes to replication whitelist
Branch: master
https://github.com/mongodb/mongo/commit/a2ff6ec6b8f88e5d79e6c09c333033f151a59961

Generated at Thu Feb 08 04:17:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.