Prevent secondaries in SessionsCollectionRS from attempting to set up the sessions collection.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6.9, 4.0.4, 4.1.5
    • Affects Version/s: 3.6.7, 4.0.2, 4.1.2
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Sharding 2018-09-24, Sharding 2018-10-22
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      In the LogicalSessionCache on replica sets, both primaries and secondaries attempt to create the sessions collection or its indexes. The secondary should only check that the collection and indexes exist before performing operations. The primary will be responsible for both creating the collection and ensuring that the indexes exist.

      Proposed Fix

      1. In SessionsCollection::setupSessionsCollection, have secondaries instead check for collection and index existence. If either doesn't exist, return an error status. Otherwise, continue.

              Assignee:
              Blake Oler
              Reporter:
              Blake Oler
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: