[SERVER-83384] Reconsider flow of collection creation and refresh in the CollectionRoutingInfoTargeter Created: 17/Nov/23  Updated: 24/Nov/23  Resolved: 24/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Allison Easton Assignee: Allison Easton
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-80372 Make implicit collection creation cal... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: CAR Team 2023-11-27
Participants:
Linked BF Score: 153

 Description   

A description of the problem is in the attached BF.

One solution would be to avoid the compiler optimizations by reordering the arguments to the or statements so that the refreshIfNeeded must be executed.

However, it may be a less fragile solution to include the refresh in the createCollectionIfNeeded function so that _lastError is always reset to boost::none, even if a new caller of these functions forgets to call both.

We should consider, especially in the bulk_write_exec where there are many targeters, whether we want all of the statements to execute or whether we want to exit early as part of this ticket.



 Comments   
Comment by Githook User [ 24/Nov/23 ]

Author:

{'name': 'Allison Easton', 'email': 'allison.easton@mongodb.com', 'username': 'allisoneaston'}

Message: SERVER-83384 Reconsider flow of collection creation and refresh in the CollectionRoutingInfoTargeter
Branch: master
https://github.com/mongodb/mongo/commit/b28dd7a119ff6f11067b03925d1bfdd9f64d8243

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