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

Allow index builds on secondaries with a "force" option.

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Indexing, Replication
    • Labels:
      None

      Description

      Even after SERVER-2771 gets sorted out, it would be good to have better support for rolling out new indexes one replica set member at a time: since index builds, whether foreground or background, impact performance on the node, anybody who is doing slaveOk queries will probably be unhappy if all their secondaries are slow down all at the same time, typically for a long duration.

      So maybe createIndex could have a force option analogous to compact's, that would make the index get built even if the node is a secondary (and I think, when a node that gets a force instruction is secondary, not registering the index build in the oplog). This way, people could more conveniently deploy their indexes one node at a time without requiring the restart-without-replSet option that's needed today.

      (Presumably, while building indexes this way, a secondary should go into recovering mode and/or do whatever else a secondary does during compact to arrange things so that clients don't route reads to it.)

        Issue Links

          Activity

          Hide
          richard.kreuter Richard Kreuter added a comment -

          Also has to do with index builds on secondaries, though this issue is kind of an alternative feature.

          Show
          richard.kreuter Richard Kreuter added a comment - Also has to do with index builds on secondaries, though this issue is kind of an alternative feature.
          Hide
          richard.kreuter Richard Kreuter added a comment -

          Andy asked me to link requests of the form "command C should put node into maintenanceMode" to the maintenanceMode issue.

          If this issue gets implemented, then the command should put the secondary into maintenanceMode.

          Show
          richard.kreuter Richard Kreuter added a comment - Andy asked me to link requests of the form "command C should put node into maintenanceMode" to the maintenanceMode issue. If this issue gets implemented, then the command should put the secondary into maintenanceMode.
          Hide
          asya Asya Kamsky added a comment - - edited

          Customer is asking for just this exact feature - they are having trouble automating adding indexes to existing clusters since it currently involves stopping mongod and restarting with a non-standard config.

          They specifically asked for offline/maintenance mode for index builds on secondaries.

          Show
          asya Asya Kamsky added a comment - - edited Customer is asking for just this exact feature - they are having trouble automating adding indexes to existing clusters since it currently involves stopping mongod and restarting with a non-standard config. They specifically asked for offline/maintenance mode for index builds on secondaries.

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: