Corrected logic for checking whether the txnId that we're trying to insert is greater than the next safe txnId at a partition