[SERVER-33160] syncApply() treatment of delete operations on non-existent namespaces Created: 07/Feb/18 Updated: 29/Oct/23 Resolved: 09/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Benety Goh | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Repl 2018-02-12 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
syncApply currently throws NamespaceNotFound exceptions on delete operations that refer to non-existent namespaces, specifically in cases when the UUID resolves to a missing collection, or when the database referred in the "ns" field does not exist. This condition does not occur during normal server operation in 3.6. However, modifications to the applyOps command proposed in |
| Comments |
| Comment by Githook User [ 09/Feb/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}Message: |
| Comment by Githook User [ 08/Feb/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}Message: |
| Comment by Judah Schvimer [ 08/Feb/18 ] |
|
This doesn't happen with rollback via refetch with UUIDs because we never refetch collections, and two phase drop ensures that we only ever drop UUIDs once they cannot be rolled back. For rollback without UUIDs, this can happen if at the common point the collection existed, but on both branches of history the collection was dropped. When rolling back the dropCollection, we try to refetch it from the sync source, but find nothing, so leave it dropped. Then during oplog application we see a delete entry (or any crud op) before the drop entry. This is almost certainly still a bug with rollback via refetch with no uuids for all crud ops and is simply untested. |
| Comment by Githook User [ 08/Feb/18 ] |
|
Author: {'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}Message: |
| Comment by Benety Goh [ 08/Feb/18 ] |
|
|
| Comment by Andy Schwerin [ 08/Feb/18 ] |
|
How does |