Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-10588

Warn about building an index with a unique constraint on a Replica Set

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      https://docs.mongodb.com/manual/tutorial/build-indexes-on-replica-sets/
      If one follows the round-robin method for building an index with a unique constraint, it is possible to end up with different data on different nodes (see SERVER-30276). There are workarounds to avoid this situation:
      1. Build the index normally using a foreground or background index build.
      Or
      2. Stop writes to the collection (or avoid inserting unique-constraint-violating data) during the round-robin index building.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 years, 37 weeks ago