-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.4
-
Repl 2020-08-10, Repl 2020-08-24
-
0
What happened was that the test OplogFetcherReturnsCallbackCanceledIfShutdownAfterRunQueryScheduled expects failpoint "hangAfterOplogFetcherCallbackScheduled" is always on to make sure oplogFetcher->shutdown() is run before the oplog fetcher tries to connect and init the cursor. But unfortunately, in getOplogFetcherAfterConnectionCreated, we disable the same failpoint, messing up with the expectation of the test.
As part of the oplog fetcher shutdown, we also force the DBClientConnection to close (shutdownAndDisallowReconnect). So if the above shutdown is run while the oplog fetcher is doing network operations, the oplog fetcher could fail with network errors instead of CallbackCanceled as expected in the unit test.
I am not sure if this is a "bug" and if the error code matters while the oplog fetcher is shutting down. But it might be a good idea to consolidate error code to CallbackCanceled in _finishCallback if _isShuttingDown().