Secondaries with {textSearchEnabled:false} will build text indexes, but won't perform text searches

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.4.0-rc1
    • Component/s: Replication, Text Search
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      (Filing on behalf of milkie)

      The procedure that we document for enabling text search on sharded/replicated clusters is to set

      {textSearchEnabled:true}

      on every mongos and mongod.

      Consider the following failure scenario, in which the user does not follow the documented instructions:

      1. User enables text search on mongos and their primaries, but forgets to enable it on their secondaries
      2. User initiates a text index build via mongos (i.e. does not do a rolling index build); all members of the cluster (including secondaries) will successfully build the index
      3. Much later, one of the secondaries gets promoted to primary
      4. All searches will subsequently fail (since the new primary does not have text search enabled)

      Suggested fix: force secondaries to fail at index build time if they do not have text search enabled.

            Assignee:
            Unassigned
            Reporter:
            J Rassi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: