[SERVER-74449] Single phase index build (index creation with empty collections) does not abort migrations Created: 28/Feb/23 Updated: 29/Oct/23 Resolved: 17/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0, 6.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Marcos José Grillo Ramirez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Sharding EMEA
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v6.0
|
||||||||||||||||
| Sprint: | Sharding EMEA 2023-03-20 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 14 | ||||||||||||||||
| Description |
|
When an index is being built, we have observers that abort any ongoing migrations for the namespace where the index is being built. This is done to ensure index consistency across shards, because if the migration already started and passed the point where it copied the collection indexes, any new index creation would leave the cluster with inconsistent indexes. Additionally, on an empty collection, an index build executes a single phase build, which only calls the onCreateIndex observer. Joining those two facts, we can see how we are missing aborting migrations in the onCreateIndex observer, which might cause inconsistent indexes across shards when an index creation is executed concurrently with a migration to a shard that previously did not have collection data. The file attached: migration_abort_index_creation.js |
| Comments |
| Comment by Githook User [ 17/Mar/23 ] |
|
Author: {'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}Message: (cherry picked from commit ba69a854467a233ed235029441b8626825d81cfc) |
| Comment by Githook User [ 16/Mar/23 ] |
|
Author: {'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}Message: |