[Upgrade/downgrade] Avoid checking internal transactions feature flag more than once when constructing transaction oplog entries and config.transactions entry

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding 2021-10-04
    • 132
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, we check the feature flag for internal transactions twice when committing a transaction (once to decide if we should add the txnRetryCounter to the applyOps oplog entry and once to decide if we should add the txnRetryCounter to the config.transactions entry) and the FCV can change between those checks, and this can cause the config.transactions entry on the primary to be inconsistent with the config.transactions entries on secondaries. 

            Assignee:
            Cheahuychou Mao
            Reporter:
            Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: