[SERVER-79781] TestGetDestinedRecipientThrowsOnBlockedRefresh should not run two refreshes without resetting the catalog cache loader mock return value Created: 07/Aug/23  Updated: 29/Oct/23  Resolved: 24/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 5.0.22, 6.0.11, 7.0.3

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Sharding EMEA 2023-09-04
Participants:
Linked BF Score: 18
Story Points: 2

 Description   

Detailed description in the attached BF.

This unittest is starting two refreshes - one from the ShardingWriteRouter and one from calling getCollectionRoutingInfoWithRefresh and is only setting the catalog cache loader mock return value for the collection once. This is fine in the normal case where the refresh from the ShardingWriteRouter completes before the getCollectionRoutingInfoWithRefresh begins the refresh because the lookup time in the catalog cache refresh becomes the actual collection version after the first refresh and the catalog cache loader mock returns no changed chunks as expected. However, in the case that the getCollectionRoutingInfoWithRefresh launches the lookup when the prior refresh hasn't completed, the lookup time is still ChunkVersion::UNSHARDED() and so the return of no changed chunks causes the new chunk map to be created with no chunks in it.



 Comments   
Comment by Githook User [ 28/Sep/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-79781 Fix race in TestGetDestinedRecipientThrowsOnBlockedRefresh unit test

(cherry picked from commit 2c65a6bf8b42426701f22f0a5e80ab3a0e1dc334)
(cherry picked from commit d5345c16735c9ca8ac8dc364157db9e2eddff7e7)
(cherry picked from commit f797f841eaf1759c770271ae00c88b92b2766eed)
Branch: v5.0
https://github.com/mongodb/mongo/commit/ccccbb5275943d4cbbc384290df19e2062a38004

Comment by Githook User [ 28/Sep/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-79781 Fix race in TestGetDestinedRecipientThrowsOnBlockedRefresh unit test

(cherry picked from commit 2c65a6bf8b42426701f22f0a5e80ab3a0e1dc334)
(cherry picked from commit d5345c16735c9ca8ac8dc364157db9e2eddff7e7)
Branch: v6.0
https://github.com/mongodb/mongo/commit/f797f841eaf1759c770271ae00c88b92b2766eed

Comment by Githook User [ 27/Sep/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-79781 Fix race in TestGetDestinedRecipientThrowsOnBlockedRefresh unit test

(cherry picked from commit 2c65a6bf8b42426701f22f0a5e80ab3a0e1dc334)
Branch: v7.0
https://github.com/mongodb/mongo/commit/d5345c16735c9ca8ac8dc364157db9e2eddff7e7

Comment by Githook User [ 23/Aug/23 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-79781 Fix race in TestGetDestinedRecipientThrowsOnBlockedRefresh unit test
Branch: master
https://github.com/mongodb/mongo/commit/2c65a6bf8b42426701f22f0a5e80ab3a0e1dc334

Generated at Thu Feb 08 06:41:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.