When applying oplog entries that were a part of a large transaction, we first add them to partialTxnList and then apply them during the commit. We then clear partialTxnList for the next large transaction.
Currently, we do not clear partialTxnList when committing a prepared transaction. This means that for large prepared transactions, partialTxnList will have entries that were not part of the same transaction.
As a part of this ticket, we should also make sure to test the bug in SERVER-41163 with large transactions. We can use initial_sync_update_missing_doc.js for this.