-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Sharding NYC
SERVER-58761 made setFVC do the following:
For each session that has an internal session that executed retryable internal transactions for a command with txnNumber (i.e. as indicated by its lsid.txnNumber) greater or equal to the latest txnNumber in the parent session, update the config.transactions entry for the parent session to have txnNumber equal to that lsid.txnNumber and lastWriteOpTime equal to {t: 1, ts: Timestamp(1, 0)}.
However, it didn't make setFCV unset/set the "state" field in the config.transactions entry for the parent session as part of that write. So a retry after a downgrade would get an IncompleteTransactionHistory with the message "Cannot retry a retryable write that has been converted into a transaction" if the previous txnNumber on the parent session corresponds to a transaction and "Incomplete history detected for transaction" if the previous txnNumber on the parent session corresponds to a retryable write. We should make it such that there can only be one kind of error message. One way to do is this to unset the "state" field or set it "committed".