[SERVER-43697] Create helper functions for building indexes with the IndexBuildsCoordinator Created: 27/Sep/19  Updated: 29/Oct/23  Resolved: 06/Nov/19

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

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

Issue Links:
Related
related to SERVER-44436 IndexBuildsCoordinatorMongod should a... Closed
related to SERVER-44437 remove DBDirectClient reference from ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-11-04, Execution Team 2019-11-18
Participants:

 Description   

The full code to create an index and handle errors with the IndexBuildsCoordinator is 70 lines long.

In order to replace the usages of MultiIndexBlock and manual OpObserver->onCreateIndex calls, we should factor this all out.

We should consider implementing the following:

  • A helper that is synchronous and only returns when an index build completes or fails
  • A helper that builds an index on an empty collection on the current thread to prevent context switches.


 Comments   
Comment by Githook User [ 06/Nov/19 ]

Author:

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

Message: SERVER-43697 renameBetweenDBs() uses IndexBuildsCoordinator::createIndexesOnEmptyCollection()
Branch: master
https://github.com/mongodb/mongo/commit/083ab1293ec096a7023b4f2b01b3d6d039f3b735

Comment by Githook User [ 05/Nov/19 ]

Author:

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

Message: SERVER-43697 MigrationDestinationManager uses IndexBuildsCoordinator::createIndexesOnEmptyCollection()
Branch: master
https://github.com/mongodb/mongo/commit/b492af1accccdf201ab64ba9ac1be14564b28c09

Comment by Githook User [ 05/Nov/19 ]

Author:

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

Message: SERVER-43697 legacy map reduce uses IndexBuildsCoordinator::createIndexesOnEmptyCollection
Branch: master
https://github.com/mongodb/mongo/commit/3c5f31349a5226f2ceceff56def534e4d5910d93

Comment by Githook User [ 05/Nov/19 ]

Author:

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

Message: SERVER-43697 build system indexes for auth using IndexBuildsCoordinator index helpers
Branch: master
https://github.com/mongodb/mongo/commit/01508fb5661fd87d5d65eca1c4941ada9c9e8d21

Comment by Githook User [ 05/Nov/19 ]

Author:

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

Message: SERVER-43697 add IndexBuildsCoordinator::createIndexes() and createIndexesOnEmptyCollection()
Branch: master
https://github.com/mongodb/mongo/commit/372c2410b3daf8add7d6a258bd42503c6537dee4

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