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

Remove Raciness in wildcard multiversion test

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.5
    • None
    • Querying
    • None
    • Fully Compatible
    • ALL
    • Query 2018-10-22
    • 0

    Description

      I believe there is a race in this code. If the secondary which starts up has a chance to start initial sync before stopSet() is called, then the node may try to sync from another node which is getting shut down. This may cause initial sync to fail with the error message such as:

      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 E REPL     [replication-0] Initial sync failed, shutting down now. Restart the server to attempt a new initial sync.
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-20271.sock
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 F -        [replication-0] Fatal assertion 40088 HostUnreachable: error while getting base rollback ID :: caused by :: Connection was closed at src/mongo/db/repl/replication_coordinator_impl.cpp 705
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| 2018-10-08T07:58:48.545+0000 F -        [replication-0]
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271| ***aborting after fassert() failure
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|
      [js_test:wildcard_index_feature_compatability_version] 2018-10-08T07:58:48.546+0000 d20271|
      

      I think we can just fix this by adding a call to awaitReplication() before stopping the set.

      Attachments

        Activity

          People

            ian.boros@mongodb.com Ian Boros
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: