[SERVER-32687] Ignore collection-not-found when fetching missing documents in sync_tail.cpp during initialSync Created: 12/Jan/18  Updated: 30/Oct/23  Resolved: 06/Feb/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.6.2, 3.7.2
Fix Version/s: 3.6.6, 3.7.2

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: initialSync
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-35368 DBClientBase::findOneByUUID should re... Closed
Problem/Incident
Related
is related to SERVER-29667 Fix document refetch step in UUID ena... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Repl 2018-02-12
Participants:
Linked BF Score: 74

 Description   

Right now we attempt to fetch missing documents during initial sync. If we fail to fetch the document because the source doesn't have it, we assume it's been deleted and continue normally. But if the source collection has been deleted, we fail; instead, we should ignore that error as well.



 Comments   
Comment by Githook User [ 07/Jun/18 ]

Author:

{'username': 'smani87', 'name': 'Suganthi Mani', 'email': 'suganthi.mani@mongodb.com'}

Message: SERVER-32687 DBClientBase::findOneByUUID should return the cmd status if DBClientBase::runCommand fails.
Branch: v3.6
https://github.com/mongodb/mongo/commit/e79c2d69777af5d7623cfdef6515a7051461a457

Comment by Githook User [ 06/Feb/18 ]

Author:

{'email': 'benety@mongodb.com', 'name': 'Benety Goh', 'username': 'benety'}

Message: SERVER-32687 DBClientBase::findOneByUUID() returns command status rather than location code on failing to retrieve document
Branch: master
https://github.com/mongodb/mongo/commit/67f4d6495ad14fe95067f06e0366823887828c0e

Comment by Spencer Brody (Inactive) [ 01/Feb/18 ]

Makes sense to me

Comment by Benety Goh [ 31/Jan/18 ]

Right now the code uasserts with a location code here, burying the original error code in the command result.

https://github.com/mongodb/mongo/blob/0322da76ec976d240191b1ca8f70c2c732f9753a/src/mongo/client/dbclient.cpp#L735

Does it make sense to uassert on the converted command result (which should contain a NamespaceNotFound code)?

Generated at Thu Feb 08 04:30:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.