[SERVER-47182] Single-phase index builds should run synchronously on secondaries Created: 30/Mar/20 Updated: 29/Oct/23 Resolved: 05/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2020-06-15 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 10 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
We can't remove single-phase index builds entirely, but we should consider forcing single-phase builds to run synchronously with oplog batch application. This enables them to stop using ghost timestamps. Single phase builds are only used for empty collections, and to rebuild indexes admin.system collections (see Use two-phase index builds by default. Evaluate and remove logic, where possible, that depends on IndexBuildProtocol::kSinglePhase, with the exception of creating indexes on empty collections. |
| Comments |
| Comment by Githook User [ 05/Jun/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: This option is only applicable to single-phase index builds on secondaries, which no longer |
| Comment by Githook User [ 04/Jun/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Benety Goh [ 04/Jun/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'} Message: Branch: master |
| Comment by Githook User [ 04/Jun/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Githook User [ 04/Jun/20 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |
| Comment by Benety Goh [ 04/Jun/20 ] |
|
The createIndexes command is no longer supported as an {{applyOps} } operation. It should be fine to assume that constraints should always be relaxed in createIndexForApply(). |
| Comment by Benety Goh [ 03/Jun/20 ] |
|
The test IdempotencyTest::IndexWithDifferentOptions expects certain behavior from applying a createIndexes oplog entry that should be preserved. |
| Comment by Louis Williams [ 03/Jun/20 ] |
|
Index builds on system indexes only happen once and on empty collections. There is a case where a system index would need to be rebuilt from a collection scan, but only if a user manually deletes it, so I think we should keep system index builds as single-phased. |
| Comment by Benety Goh [ 03/Jun/20 ] |
|
|
| Comment by Benety Goh [ 03/Jun/20 ] |
|
Index builds on some system indexes will probably remain single-phased. See |
| Comment by Louis Williams [ 06/May/20 ] |
|
Single-phase index builds aren't going to be removed completely, but I think we can straighten out some logic and make assertions about the following:
|