Rollback stable has a bug where it reads a junk value as the newest transaction ID when there is no transaction ID present in the checkpoint, which led to opening the files unnecessarily and an OOM problem occurring during recovery.
file:collection-10000--8462810182974390560.wt, txn rollback_to_stable: [WT_VERB_RECOVERY_RTS(session)] tree rolled back with durable timestamp: (0, 0), or when tree is modified: false or prepared updates: false or txnid: 187650161381336 is greater than recovery checkpoint snap min: true"}}
The transaction ID value is a very large value, and it is wrong.
Fix it by reading the transaction ID value only when it exists in the checkpoint. Also test the scenario where the database has multiple files that are created in MongoDB 4.2 or older.