[SERVER-83497] Simplify commit function for the new create collection coordinator Created: 21/Nov/23  Updated: 15/Dec/23  Resolved: 15/Dec/23

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

Type: Improvement Priority: Major - P3
Reporter: Pol Pinol Assignee: Pol Pinol
Resolution: Fixed Votes: 0
Labels: robust-create-collection
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83637 Ensure that create collection coordin... Closed
is depended on by SERVER-80135 Allow ShardCollection to work correct... In Progress
Related
related to SERVER-78918 Make `shardCollection` command shard ... Closed
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Sprint: CAR Team 2023-12-11, CAR Team 2023-12-25
Participants:

 Description   

The current commit function of the create collection is shared between the legacy coordinator and the new coordinator. With the new phases and logic (transactional commit), there is redundant logic that could be simplified only for the new coordinator.

The goal of this ticket is to separate the legacy commit from the new one, and simplify its logic taking advantage of recent changes and phases.

Some examples of the work that we can do on the new commit:

  • Remove the fire and forget.
  • Remove try and catch from the transactional commit.
  • Try to force a refresh, if not, clear the filtering metadata without throwing.
  • Investigate the need to throw on the catch clause.


 Comments   
Comment by Githook User [ 15/Dec/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-83497 Simplify commit function for the new create collection coordinator

GitOrigin-RevId: dfec9a37315507a7cfe3a34dc38ec30d14dada39
Branch: master
https://github.com/mongodb/mongo/commit/d2edd8be120affca0a0a348fadec407c19895493

Comment by Githook User [ 14/Dec/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: Revert "SERVER-83497 Simplify commit function for the new create collection"

This reverts commit 36b030b0a538b65a9056678dd798353d3118cc48.

GitOrigin-RevId: 230c18aefc374137152b59d9793d31087c1e1060
Branch: master
https://github.com/mongodb/mongo/commit/f7274170f3c47be81ae748b8cfbbaa796b4735c5

Comment by Githook User [ 14/Dec/23 ]

Author:

{'name': 'Pol Pinol Castuera', 'email': 'pol.pinol@mongodb.com', 'username': 'PolPinol'}

Message: SERVER-83497 Simplify commit function for the new create collection
coordinator

Add jstest to trigger the fix

Create new phase

Drop collection on participant shards

Address feedback

Redo changes on jstest

Introduce new failpoint

Add nodes to shard

Add comment

Revert rollback changes

Revert ensure rollback

Remove line

Update commit on legacy

Remove skipBestEffortParticipantsRefresh argument

Unify commit paths

Collapse into one commit func

Fix legacy commit

Rename phase

Extract notifyChangeStreamsOnShardCollection

FirstExecution changes

Fix comment

Nit change

Fix clang tidy

GitOrigin-RevId: 36b030b0a538b65a9056678dd798353d3118cc48
Branch: master
https://github.com/mongodb/mongo/commit/f9c85e1cd1e1a75f5fef4478a5ed941b2ae72038

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