[SERVER-51791] Make isCommitOrAbortIndexBuild check in _logOpsInner check the content of the oplog entry Created: 21/Oct/20 Updated: 29/Oct/23 Resolved: 22/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cheahuychou Mao | Assignee: | Cheahuychou Mao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding 2020-11-02 | ||||
| Participants: | |||||
| Linked BF Score: | 13 | ||||
| Description |
|
This variant inside _logOpsInner was added to ensure that tenant migrations always block all oplog entries other than commitIndexBuild and abortIndexBuild oplog entries. However, the current implementation could lead to invariant failure for batch insert that contains a doc with "commitIndexBuild" or "abortIndexBuild" as a field. We should change to check to only throw if the doc corresponds to an actual commitIndexBuild or abortIndexBuild oplog entry. Also, the check should only be done if tenant migrations are enabled and should uassert instead of invariant. |
| Comments |
| Comment by Githook User [ 22/Oct/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}Message: |