restore fails if config.system.sessions ends up in backup oplog

Description

If config.system.sessions ends up in backup oplog restore will fail like this:

I have reproduced this currently with PSMDB 3.6 - 3 node replica set, but I'll try it with 4.0 also.

This test is based on the build with git hash: 3e865e9308ed5b10d9a4aa425077c1f493194254

I think this is probably related to these tickets:
https://jira.mongodb.org/browse/TOOLS-1797
https://jira.mongodb.org/browse/SERVER-31216

Steps to reproduce:
step 1: add 5M data collection

this is so we have some significant amount of that so that backup takes some time.

step 2:
start backup in the shell

AND AS SOON AS POSSIBLE AFTER STARTING THAT create new session and run insert load from mongo client

and let backup finish.

I can search with editor that config.system.sessions is inside 2019-04-10T14:46:43Z_rs1.oplog file.

step 3: drop databases from primary

step 4: run restore and observe that it fails

mongod log file:

pbm-agent log file:

Environment

None

Activity

Done

Details

Assignee

Reporter

Time tracking

7h 10m logged

Fix versions

Priority

Created April 10, 2019 at 3:47 PM
Updated March 5, 2024 at 7:28 PM
Resolved June 10, 2019 at 9:30 PM