Different indexes on different replica set members

后端 未结 1 694
时光取名叫无心
时光取名叫无心 2021-01-04 18:36

As part of our mongo cluster, we have a hidden node that the analytics people use for reporting. Their queries are quite a bit different than the ones that our main applicat

相关标签:
1条回答
  • 2021-01-04 19:09

    Yes - you can use a variation on the strategy used for creating a new index in a replica set without down time. This will require that the hidden member be taken off-line while the index(es) are created.

    Here is the link for the strategy: http://docs.mongodb.org/manual/tutorial/build-indexes-on-replica-sets/#procedure

    In your case you will take the hidden member off-line and restart in a standalone mode (remove the --replSet option and use a different port number). Once the member is isolated you can adjust the indexes (remove un-needed ones and add new ones). Once the indexes are done being created restart the member with the old port and --replSet option.

    The hidden member will resync to the replica set and you are all set.

    0 讨论(0)
提交回复
热议问题