In FCV 4.2, the TransactionParticipant must always update config.transactions and write an abort oplog entry when aborting a transaction. It must do so before updating the in-memory state. We should test that secondaries can apply abort oplog entries for unprepared transactions. Secondaries performing read-only transactions must not attempt to write abort oplog entries.
Note that it might be technically difficult and unnecessary to update config.transactions and write an abort oplog entry when aborting a transaction due to hearing of a higher transaction number. Once the client uses a higher transaction number, they forgo the right to recover the state of older transactions.
We will only write an abort oplog entry in FCV 4.2, since 4.0 nodes cannot process abort oplog entries. This is fine, since it is only necessary to perform a write when aborting a transaction when using the session through multiple mongoses.