[SERVER-36568] Avoid unique index format update via an empty collMod on secondary with FCV=4.0 Created: 10/Aug/18 Updated: 29/Oct/23 Resolved: 23/Aug/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 4.1.1 |
| Fix Version/s: | 4.1.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Neha Khatri | Assignee: | Neha Khatri |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | storage-engines | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Storage Engines 2018-08-27 | ||||
| Participants: | |||||
| Linked BF Score: | 15 | ||||
| Description |
|
We are seeing multiple evergreen failures with following assertion failure during a collection Validate on a secondary in a replica set.
This failure looks related to recent changes in the unique index format. |
| Comments |
| Comment by Githook User [ 23/Aug/18 ] |
|
Author: {'name': 'nehakhatri5', 'email': 'neha.khatri@mongodb.com', 'username': 'nehakhatri5'}Message: An empty collMod is used to upgrade unique index during FCV upgrade. If an application |
| Comment by Neha Khatri [ 17/Aug/18 ] |
|
Thanks for the repro script benety.goh. It was very useful. I see what's happening here. An empty collMod is assumed to be a collMod for unique index upgrade here. When an empty collMod command is executed on primary, the oplog apply on secondary would invoke collModWithUpgrade in response. This would trigger the unique index upgrade logic on secondary. Since FCV is 4.0, unique index metadata update will change the index formatVersion back to old formatVersion i.e. 8. This formatVersion change(downgrade) is undesired and it interferes with the index validation logic resulting in the user assertion failure on secondary only. Note the same thing does not happen on the primary because it takes a different path of invoking non-upgrade collMod. |