[SERVER-80203] Normalization of time-series meta field can break insert targeting Created: 17/Aug/23 Updated: 04/Dec/23 Resolved: 28/Sep/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.1, 7.2.0-rc0, 5.0.22, 7.0.3, 6.0.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Gregory Noma |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution NAMER
|
||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v7.1, v7.0, v6.0, v5.0
|
||||||||||||||||||||||||||||||||||||
| Sprint: | Execution NAMR Team 2023-09-18, Execution NAMR Team 2023-10-02 | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||
| Description |
|
Issue summary Issue Summary This affects time series sharded collections starting in MongoDB version 5.0.6 through versions 5.0.21, 6.0.11 and 7.0.2 and Rapid Release version 7.1.1. Issue Description and Impact
This occurs because:
When the shard that receives a vulnerable document does not own the chunk range for the normalized form of the shard key / metaField value, the document is orphaned and effectively lost. For example - a shard which has the chunk range { "b" : 1 } → { "$maxKey" : 1 } could receive the document with metaField { "b" : 1, "a" : 1 } even though the document is persisted with the metaField { "a" : 1, "b" : 1 }. Note that when the correct chunk range and "incorrect" chunk range are owned by the same shard, this issue is self-healing. Documents orphaned in this way:
Workaround Upgrading to MongoDB versions 5.0.22, 6.0.12, or 7.0.3 prevents the issue from occurring, but remediation is still required. See the Remediation section below for further guidance. Please reach out to MongoDB Support if you are unable to upgrade to a version containing a fix for this issue. Remediation We recommend taking the following actions, in order, to identify and preserve orphaned documents for later recovery. Please review all steps carefully before proceeding.
Please reach out to MongoDB Support if you have any questions or issues with performing the steps above. Documentation |
| Comments |
| Comment by Githook User [ 16/Oct/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit 1a77b9c2182a01870262fac6b9e4c6df2dc05fa5) |
| Comment by Githook User [ 04/Oct/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit 48ce9d9b4cc7c623cc1f4a67db300ca7d3c800a5) |
| Comment by Githook User [ 03/Oct/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |
| Comment by Maria Prinus [ 02/Oct/23 ] |
|
The release team discussed this issue and based on it we decided not to block 7.1.0 with this ticket. This change must be backported to 7.0 (done in BACKPORT-16944), and we recommend to backport this change to 7.1.1 if we have to release one. |
| Comment by Githook User [ 02/Oct/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: (cherry picked from commit 1a77b9c2182a01870262fac6b9e4c6df2dc05fa5) |
| Comment by Githook User [ 28/Sep/23 ] |
|
Author: {'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}Message: |
| Comment by Maria Prinus [ 05/Sep/23 ] |
|
Downgrading to P3 to mark this one as a non-blocking ticket for the releases. |
| Comment by Maria Prinus [ 31/Aug/23 ] |
|
britt.snyman@mongodb.com confirmed that this is not a blocker for MongoDB 5.0.21-rc0 |