[SERVER-9135] fast index build for initial sync Created: 26/Mar/13  Updated: 19/Feb/16  Resolved: 27/Aug/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance, Replication
Affects Version/s: None
Fix Version/s: 2.7.5

Type: Bug Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-20222 Index rebuilding on secondary during ... Closed
Related
Tested
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Use the bulk loader like we already do for compact, etc.



 Comments   
Comment by Mathias Stearn [ 27/Aug/14 ]

New steps to initial-sync a collection:

  1. Remember current oplog position on source
  2. Copy all data from source, not using a snapshot read
  3. Build the _id index dropping all documents with duplicate _ids
  4. Apply all oplog changes since we started copying (this resolves issues related to dropping the duplicate _ids)
  5. Build remaining indexes in parallel using the MultiIndexBlock.
Comment by Githook User [ 13/Aug/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-13951 Split index building in to UnitOfWork-sized stages

All index builds now go through the MultiIndexBuilder as its API was already
close to ideal. The following tickets have also been addressed by this commit:

SERVER-14710 Remove dropDups
SERVER-12309 Cloner build indexes in parallel
SERVER-14737 Initial sync uses bg index building
SERVER-9135 fast index build for initial sync
SERVER-2747 can't kill index in phase 2
SERVER-8917 check error code rather than assuming all errors are dups
SERVER-14820 compact enforces unique while claiming not to
SERVER-14746 IndexRebuilder should be foreground and fail fatally
Branch: master
https://github.com/mongodb/mongo/commit/00913e47de5aced5267e44e82ac9e976bbaac089

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