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

Re-enable analyze_shard_key_database_and_shard_versioning.js targeting secondaries node

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Catalog and Routing
    • ALL

      Analyze shard key can be executed against both a primary node or a secondary. This is tested in analyze_shard_key_database_and_shard_versioning where a movePrimary is added before the command is executed to confirm this behaviour is respected also in case the primary shard changes. 

      However, after SERVER-81190 unsharded collection are registered in the sharding catalog and they are supposed not to be moved by the movePrimary.  Due to SERVER-79668 unsplittable collection are actually moved.

      This is causing a known issue (SERVER-83277): movePrimary does not bump the shardVersion, causing any stale router to target the old primary without receiving a StaleConfig. 

      To temporarily bypass this issue, which will be solved as part of SERVER-81141, in SERVER-81190 the mentioned test is skipped in case trackUnsheded is enabled, causing a loss of test coverage. To still leave the command working on primary nodes, the movePrimary currently forces a clean-up of filtering metadata on the primary node, causing a refresh that will update corrently the filtering metadata on the primary.

      This ticket should remove the check and enable the test again.

       

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            enrico.golfieri@mongodb.com Enrico Golfieri
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: