[SERVER-14746] IndexRebuilder should only restart index builds initiated internally Created: 31/Jul/14 Updated: 06/Dec/22 Resolved: 03/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Replication |
| Affects Version/s: | 2.5.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||
| Description |
|
It should not restart user-initiated index builds. Scenario: At this point, node A now has an index that does not exist on the primary and never will. This would be less of a problem for a non-unique index, but because this is unique, an insert can now succeed on the primary but fail on node A, breaking replication. I think the right solution is to only rebuild indexes where we would not call logOp on completion. |
| Comments |
| Comment by Benety Goh [ 03/Mar/20 ] |
|
With two phased index builds enabled by default in SERVER_43692, the scenario in the description should no longer be possible because node B begins building the unique index as soon as it receives the startIndexBuild oplog entry from node A. When node A restarts, it will wait for the commitIndexBuild oplog entry from node B before finalizing its index build. |
| Comment by Benety Goh [ 03/Mar/20 ] |
|
The startup recovery logic was moved to the IndexBuildsCoordinator in The IndexRebuilder was removed in |
| Comment by Daniel Gottlieb (Inactive) [ 15/May/18 ] |
|
We expect this has been (mostly?) fixed in 3.7 on WT (specifically, all "KV" storage engines) as part of |
| Comment by Mathias Stearn [ 20/Aug/14 ] |
|
This was accidentally closed instead of |
| Comment by Mathias Stearn [ 13/Aug/14 ] |
|
Would need custom backport. |
| Comment by Githook User [ 13/Aug/14 ] |
|
Author: {u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}Message: All index builds now go through the MultiIndexBuilder as its API was already
|