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

CheckShardFilteringMetadata incorrectly checks ReplSetTests created outside ShardingTest objects

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

      The CheckShardFilteringMetadata hook is executed on teardown of ShardingTest. Its intent is to iterate on each existing shard (according to config.shards) to:

      1. first wait for replication activities across the shard nodes to complete
      2. then perform a per-node check of the local metadata against the content of the config catalog

      but It turns out that the first step is implemented through a second loop through all the shards of the cluster - according to the ShardingTest._rs array field. This logic is unable to target replica sets that are added to the sharded cluster after the creation of ShardingTest and keep forming part of the cluster by the time {{ShardingTest.stop }} is invoked (example).

      The test hook may hence check secondary nodes of such ReplicaSets while filtering metadata are still being replicated, leading to test failures.

            Assignee:
            Unassigned Unassigned
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: