[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:
Depends
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: SERVER-51791 Make isCommitOrAbortIndexBuild check in _logOpsInner check the content of the oplog entry
Branch: master
https://github.com/mongodb/mongo/commit/71c64413264c1a67c4cc9df219f4c0f0378aca1f

Generated at Thu Feb 08 05:26:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.