Migrations to sharded migrations have been disabled in Relational Migrator

XMLWordPrintableJSON

    • Type: Sub-task
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • App Modernization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Issue Status as of May 14, 2026

      ISSUE DESCRIPTION AND IMPACT
      Relational Migrator (RM) uses an updateMany to insert embedded documents and embedded arrays into the target documents. However, there are some documented issues with updateMany to sharded clusters where, if a range migration occurs at the same time as an updateMany, then some documents that matched the query filter won’t get updated. Effectively this means that, for migrations above the range size (default 128MB). If a foreign key relationship would have many matching documents, this also increases the chance of some embedded objects being missing.

      DIAGNOSIS AND AFFECTED VERSIONS
      Present in all RM versions since its public release version 1.1.2. Migrations to sharded clusters have been disabled in RM v1.16.0.

      • Running verification after the migration would have detected any data integrity issues. Please note that verification is currently only possible after a migration.
      • Since the data loss when migrating to a sharded cluster is non-deterministic, we recommend running manual verification on your target database to check whether there are any embedded documents or arrays that are missing.

      REMEDIATION AND WORKAROUNDS
      If you need to migrate to a sharded cluster, you may add the ‘migrator.sharded.connection.allowed: true’ property in the configuration file according to your OS. To ensure no embedded documents are missed, disable the MongoDB balancer for the duration of the migration OR ensure each collections’ shard key matches all the foreign keys used by new document mapping to all its embedded mappings.
      Please feel free to open a MongoDB support ticket for direct assistance.

            Assignee:
            Unassigned
            Reporter:
            Marian Derias
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: