Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3727

Mongodump/mongorestore should not automatically upgrade unversioned 2dsphere indexes

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • TAR 2025-02-03
    • 3
    • Tools and Replicator
    • 0
    • 851

      Problem

      Mongodump/mongorestore currently builds unversioned 2dsphere indexes on the destination based on the default index version. This means that unversioned 2dsphere indexes are built with version 3 on the destination, although server treats them as v1 on the source.

      According to the server release notes, v3 added a performance improvement, but v2 included a big behavior change.

      Solution & Acceptance Criteria

      Mongodump/mongorestore should stop automatically building unversioned 2dsphere indexes with the default version (3). See the linked IA writing ticket for the comprehensive solution.

      Likewise, we should also add an invariant to prevent unversioned text indexes.

      Impact

      This bug can cause a destination 2dsphere index to behave differently than an unversioned 2dsphere index on the source.

            Assignee:
            felipe.gasper@mongodb.com Felipe Gasper
            Reporter:
            ajay.vijayakumar@mongodb.com Ajay Vijayakumar
            Ajay Vijayakumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: