Some MongoDB tests are failing with the following error message:
WT_CONNECTION.rollback_to_stable: __txn_rollback_to_stable_check, 455: rollback_to_stable illegal with active transactions
This is despite no MongoDB operations being active when rollback_to_stable is called.
Debugging indicates that the sweep thread can have a transaction active when removing stale entries from the lookaside table, and that transaction can cause the check to fail unnecessarily.
Since the later phase of rollback_to_stable holds a lock to prevent sweep running concurrently, this check should use the same approach to avoid spurious failures.