[SERVER-35780] `renameCollection` across databases incorrectly timestamps metadata for secondary index builds Created: 25/Jun/18 Updated: 29/Oct/23 Resolved: 31/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.3, 4.1.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Maria van Keulen |
| 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.0
|
||||||||||||||||
| Sprint: | Storage NYC 2018-07-30, Storage NYC 2018-08-13 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 50 | ||||||||||||||||
| Description |
|
Renaming collections across databases is not a simple rename, but rather a process of:
Copying the index definitions over uses a single MultiIndexBlock. All of the indexes are generated with `ready: false` writes in one WUOW and a single timestamp from a noop oplog entry. However, committing the `ready: true` writes has the following sequence (for demonstration, suppose two secondary indexes, A and B):
In this case, both `ready: true` writes are given timestamp 2. Rolling back inbetween these times will see both indexes as `ready: false`, but replication recovery will only rebuild index B. This is an analogous bug to This ticket should consider adding the following invariant right before here:
|
| Comments |
| Comment by Githook User [ 07/Sep/18 ] |
|
Author: {'name': 'Maria van Keulen', 'email': 'maria@mongodb.com', 'username': 'mvankeulen94'}Message: (cherry picked from commit 57d12da516328ddc2102d8f71f9c4ebccb6b349d) |
| Comment by Githook User [ 31/Jul/18 ] |
|
Author: {'name': 'Maria van Keulen', 'email': 'maria@mongodb.com', 'username': 'mvankeulen94'}Message: |