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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.4.0-rc1
    • Replication, Text Search
    • None

    Description

      (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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: