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.
- In SessionsCollection::setupSessionsCollection, have secondaries instead check for collection and index existence. If either doesn't exist, return an error status. Otherwise, continue.