[SERVER-60612] extract collMod implementation for modifying an existing index Created: 12/Oct/21  Updated: 29/Oct/23  Resolved: 14/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2021-10-18
Participants:
Linked BF Score: 15

 Description   

The collMod command has been steadily extended in recent years to include more ways to modify an existing index. Both the collection-level functionality and the index-specific code are currently contained in catalog/coll_mod.cpp. It would be nice to extract the index modification logic into its own implementation file.



 Comments   
Comment by Githook User [ 14/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60612 collModIndexRequest accepts const CollModIndexRequest

In earlier revisions, _processCollModInternal() needed to update the
IndexDescriptor field in CollModRequest. Recent changes made it unnecessary
to mutate CollModIndexRequest::idx after calling IndexCatalog::refreshEntry().
Branch: master
https://github.com/mongodb/mongo/commit/4b445f9d21ad18ee5d3218383b5180a4b9a9da01

Comment by Githook User [ 14/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60612 processCollModIndexRequest() no longer updates CollModIndexRequest::idx

This used to be important in the collMod implementation when we had to access
the IndexDescriptor after calling IndexCatalog::refreshEntry().
Branch: master
https://github.com/mongodb/mongo/commit/a99a39628e6cc5ddf72c6a3ead6b62e836519963

Comment by Githook User [ 14/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60612 make CollModIndexRequest a data member, rather than a parent class, of CollModRequest
Branch: master
https://github.com/mongodb/mongo/commit/05c9174694e84c443b4a58050c64f113eebc42bf

Comment by Githook User [ 14/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60612 clean up coll_mod.cpp includes
Branch: master
https://github.com/mongodb/mongo/commit/52be114ab53ba1be2696d4c7c417e6d2e44eaf62

Comment by Githook User [ 14/Oct/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60612 add processCollModIndexRequest()

This extracts the logic for processing {collMod: 'coll', index: {}}
into its own implementation file. Currently, this affects collMod index
operations for expireAfterSeconds and hidden.
Branch: master
https://github.com/mongodb/mongo/commit/e4d4be06279960b2039ef24d18dc24d07f990422

Generated at Thu Feb 08 05:50:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.