[SERVER-65837] Use internal transactions instead of applyOps in removeShard Created: 20/Apr/22  Updated: 29/Oct/23  Resolved: 19/May/22

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

Type: Task Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-33326 Remove use of applyOps/doTxn from sha... Closed
Problem/Incident
Related
related to SERVER-66350 Remove OpObserver::onApplyOps function Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-05-02, Sharding EMEA 2022-05-16, Sharding EMEA 2022-05-30
Participants:
Linked BF Score: 178

 Description   

The current implementation of removeShard is using applyOps to write the new shard and topology time in the config server. As part of SERVER-33326 we're changing all usages of applyOps for internal transactions, so it could look similar to how resharding is currently doing it.



 Comments   
Comment by Githook User [ 19/May/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-65837 Use transactions instead of applyOps when removing a shard
Branch: master
https://github.com/mongodb/mongo/commit/eb90659062d8ac2dfd629b5d672c67423bddaa6a

Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Sviatlana Zuiko', 'email': 'sviatlana.zuiko@mongodb.com', 'username': 'szuiko'}

Message: Revert "SERVER-65837 Use transactions instead of applyOps when removing a shard"

This reverts commit 5c66978ef79a68d916f86bfbe778dacad655691e.
Branch: master
https://github.com/mongodb/mongo/commit/2092955f3173233130d314c2984ba1c5c0353503

Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-65837 Use transactions instead of applyOps when removing a shard
Branch: master
https://github.com/mongodb/mongo/commit/5c66978ef79a68d916f86bfbe778dacad655691e

Comment by Marcos José Grillo Ramirez [ 04/May/22 ]

jordi.serra-torrens@mongodb.com Correct, probably it will need to be moved to the onUpdate function.

Comment by Jordi Serra Torrens [ 02/May/22 ]

Currently the VectorClock's topology time on the config server is advanced by an opObserver's onApplyOps method. Since this ticket will make removeShard use a transaction instead of applyOps, I guess we'll need to change how the opObserver ticks the topology time as well right?

Comment by Kaloian Manassiev [ 21/Apr/22 ]

Instead of following the resharding example, can we instead take advantage of the new transactions API? cheahuychou.mao@mongodb.com, is there some example that we can look at to see how to do that?

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