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

Make insert routing more deterministic for bulk_write_max_replies_size_mongos.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • Repl 2024-03-18
    • 27

      This test has two shards, and does an unordered bulkWrite where the second insert is to an unsharded, non-existent collection. The test assumes that mongos will always route that insert to shard1 and that shard1 will return a StaleConfig error to mongos for that write.

      However, it appears that sometimes mongos can end up deciding to send the write to shard0 right off the bat (I think this is likely some race around refreshing the catalog cache) which causes the test to fail.

      To make this more deterministic we can shard the collection, ensure its initial chunk is on shard0, and then move that chunk to shard1 using ShardVersioningUtil.moveChunkNotRefreshRecipient. mongos should then send the write to shard1 and shard1 will return a StaleConfig error reliably.

            Assignee:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: