Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50063

Oplog fetcher can return network errors or CallbackCanceled when shutting down

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.4.1, 4.7.0
    • Replication
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Repl 2020-08-10, Repl 2020-08-24
    • 0

    Description

      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().

      Attachments

        Activity

          People

            lingzhi.deng@mongodb.com Lingzhi Deng
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: