[SERVER-21307] Replicated DDL (catalog) operation during background index build blocks reads/writes Created: 05/Nov/15 Updated: 20/Mar/23 Resolved: 27/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.0.7, 3.2.0-rc2 |
| Fix Version/s: | 4.3.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 16 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | Reproduction script attached. Tested on MMAPv1. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2020-03-09 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
A replicated dropIndexes operation, performed on a collection that is currently performing a background index build, will block replication and all read operations to that member for the duration of the index build.
|
| Comments |
| Comment by Benety Goh [ 27/Feb/20 ] |
|
Underlying issues fixed in other SERVER tickets. The test referenced in git commit has been updated to match the user commands in the reproduction script attached to this ticket. |
| Comment by Githook User [ 27/Feb/20 ] |
|
Author: {'name': 'Benety Goh', 'username': 'benety', 'email': 'benety@mongodb.com'}Message: |
| Comment by Benety Goh [ 25/Feb/20 ] |
|
The scenario described in the attached repro.js is no longer applicable:
|
| Comment by Benety Goh [ 25/Feb/20 ] |
|
With This change in replica set semantics for index builds directly supports the work in |
| Comment by Eric Milkie [ 26/Apr/18 ] |
|
After the completion of |
| Comment by Asya Kamsky [ 07/Dec/17 ] |
|
We are working on a larger project to improve handling of index builds/drops on all nodes which should resolve this issue. |
| Comment by Eric Milkie [ 16/Oct/17 ] |
|
Some metadata operations require no background index builds in any collection in the database, while others only require no background index build in the collection of the operation. |
| Comment by Chuy Martinez [ 12/Oct/17 ] |
|
Does this problem only happen when running an index build and dropping an index (or any other metadata update as per above) in the same collection? Or would this affect any simultaneous createIndex/dropIndex regardless of the collection? |
| Comment by Eric Milkie [ 05/Nov/15 ] |
|
I believe this is actually true for any metadata operation that affects the index build, not just dropIndexes. |