- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
Major - P3
 - 
    Affects Version/s: None
 - 
    Component/s: None
 
- 
        Fully Compatible
 - 
        ALL
 - 
        
 - 
        49
 - 
        None
 
- 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 - 
        None
 
The onTransactionPrepare opObserver early-returns when there are no statements in the transaction. If a "find" transaction is started, and later prepared, this should not be legal if there are no statements to prepare.
Session::prepareTransaction calls WriteUnitOfWork::prepare() regardless of whether or not a prepare optime was generated. This leads RecoveryUnit::prepareUnitOfWork to be called when no prepare timestamp has been set, causing this invariant failure
Prepare should either a) be a no-op or b) return an error when there are no operations to prepare