[SERVER-74953] Explore avoiding stepdowns during the early phases of index build setup Created: 16/Mar/23 Updated: 04/Jul/23 Resolved: 15/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Yujin Kang Park | Assignee: | Yujin Kang Park |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Sprint: | Execution Team 2023-03-20, Execution Team 2023-04-03, Execution Team 2023-04-17, Execution Team 2023-05-01, Execution Team 2023-05-29, Execution Team 2023-06-12, Execution EMEA Team 2023-06-26 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Explore avoiding stepdowns during the early phases of index build setup, until the build reaches kPostSetup. Original description An index build can register and get stuck trying to acquire a ticket to actually do the setup (and replicate startIndexBuild). So it is possible for the index build to be registered, when a stepdown happens, which does not kill the builders opCtx, and the build is still stuck after going into steady state replication as secondary. The new primary drops the collection, and on applying the drop in the secondary, we assert that there are no builds in progress... but there is one which is registered because the old primary has not yet advanced to a point where it checks if it is still primary. Being blocked on ticket acquisition is not a necessity for this to manifest, as a sufficiently slow machine could theoretically suffer from the same issue. |
| Comments |
| Comment by Githook User [ 04/Jul/23 ] |
|
Author: {'name': 'Yu Jin Kang Park', 'email': 'yujin.kang@mongodb.com', 'username': 'ykangpark'}Message: |
| Comment by Yujin Kang Park [ 15/Jun/23 ] |
|
|
| Comment by Yujin Kang Park [ 25/May/23 ] |
|
Linking |
| Comment by Josef Ahmad [ 11/May/23 ] |
|
Proposing resolving this bug as part of |
| Comment by Josef Ahmad [ 11/May/23 ] |
|
I reproduced the issue on 6.1.0 and proved it does not reproduce by reverting |
| Comment by Josef Ahmad [ 05/May/23 ] |
|
This bug may have been around since 6.1, due to In any case, I believe the index build setup phase should ideally be atomic. Preventing an election from interleaving with the setup avoids an undesirable state where a new primary isn't aware that an index build has already started setting up. (I just attached yujin.kang@mongodb.com's reproducer) |