Operational Defect Database

BugZero found this defect 72 days ago.

MongoDB | 2603680

Make insert routing more deterministic for bulk_write_max_replies_size_mongos.js

Last update date:

3/12/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

8.0.0-rc0

Description:

Info

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.

Top User Comments

xgen-internal-githook commented on Tue, 12 Mar 2024 17:58:28 +0000: Author: {'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'} Message: SERVER-87737 Make bulk_write_max_replies_size_mongos.js insert routing more deterministic (#19794) GitOrigin-RevId: 691770ee4f6a0d39b23b0b92aee23992f9902d6b Branch: master https://github.com/mongodb/mongo/commit/b9e5ac1ef8e736b418505409cb217f2ab30dea30

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...