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

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.1, 4.7.0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Sprint:
      Repl 2020-08-10, Repl 2020-08-24
    • Linked BF Score:
      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

            Assignee:
            lingzhi.deng Lingzhi Deng
            Reporter:
            lingzhi.deng Lingzhi Deng
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: