Since the txn_mgr will retry transactions across elections, the transaction could clear while the txn mgr is sending retries which would then come back as failures.
This would cause the pending_txn to be marked as failed after it had cleared.
This patch ensures that a failed status is only set if the current status is not already cleared
Since the txn_mgr will retry transactions across elections, the transaction could clear while the txn mgr is sending retries which would then come back as failures.
This would cause the pending_txn to be marked as failed after it had cleared.
This patch ensures that a failed status is only set if the current status is not already cleared