[SERVER-65439] Tenant Migration oplog applier may try to wrongly mark an index as multikey. Created: 11/Apr/22 Updated: 29/Oct/23 Resolved: 22/Apr/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc4, 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Suganthi Mani | Assignee: | Christopher Caplinger |
| 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: |
v6.0
|
||||||||||||||||
| Sprint: | Server Serverless 2022-04-18, Server Serverless 2022-05-02 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 46 | ||||||||||||||||
| Description |
|
After writing the record to collection table, we index records. While indexing records, we track any index keys that needs to be marked as multikey in the _mdb_catlog table for that collection, via opCtx decoration. And, we don't reset the tracker after marking the index as multi-key in the collection catalog entry. So, if write ops on different collection shares the same opCtx, we might wrongly mark an index as multi-key for a collection if the index keys of that collection has the same name as the multikey index name of the previously applied collection operation. In tenant oplog applier case, write ops on different collection that's get applied by the same TenantMigrationWriter thread in a single batch, will share the same opCtx. This can lead either to tenant migration failure due to this error or silently marking a wrong index as mutikey on recipient primary. |
| Comments |
| Comment by Githook User [ 02/May/22 ] |
|
Author: {'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}Message: (cherry picked from commit 51b92630cc5a6448de092c1c6a38c70d702c5153) |
| Comment by Githook User [ 21/Apr/22 ] |
|
Author: {'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}Message: |