[SERVER-46603] disallow empty collection index build optimization on secondaries Created: 04/Mar/20 Updated: 29/Oct/23 Resolved: 11/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Suganthi Mani | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2020-03-23 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 43 | ||||||||||||||||||||||||||||||||
| Description |
|
summary: shouldBuildIndexesOnEmptyCollectionSinglePhased() is racy and can make index builds to hang forever and can block DDL operations. The empty collection check is racy. [Acquires collection lock in X mode. ======>>>>Documents can get deleted here [Index build thread pool scheduling |
| Comments |
| Comment by Githook User [ 12/Mar/20 ] |
|
Author: {'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}Message: (cherry picked from commit a6bdcd9f7f1264f5161720bb174a0c81396e412c) |
| Comment by Githook User [ 11/Mar/20 ] |
|
Author: {'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}Message: |
| Comment by Suganthi Mani [ 04/Mar/20 ] |
|
The racy check has manifested in different ways, like in BF-16446 (see this for detailed analysis) and BF-16220. This can also lead to the original problem like in 1) Primary registers index build for index 'x_1' on ns foor.bar. |