[SERVER-67273] Add feature flag to always create config.transactions index on step up Created: 14/Jun/22  Updated: 29/Oct/23  Resolved: 14/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc11, 6.1.0-rc0

Type: Bug Priority: Critical - P2
Reporter: Jack Mulrow Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Sharding 2022-06-27
Participants:
Linked BF Score: 12

 Description   

PM-2210 added a partial index to config.transactions to support retryable writes that execute using transactions. Normally the index is created when config.transactions is created on step up to primary or during the setFeatureCompatibilityVersion command. The setFCV logic was added in SERVER-66565 but was not on 6.0 until 6.0.0-rc8 so clusters that upgraded to 6.0 and set FCV to 6.0 before then skipped creating the index. As of SERVER-66565, when a retryable write or transaction is first seen by a mongod, it runs a query with a hint for that index that will fail if the index does not exist. Thus clusters that upgraded in that window will not be able to run retryable writes or transactions if the internal transactions feature flag (featureFlagInternalTransactions) is enabled, which it is by default in 6.0. The feature flag can be disabled to avoid this.

To simplify creating the collection on affected clusters, we should add logic so on step up the partial index will always be created even if the collection is not empty, and we'll add this behind a feature flag so it can be enabled only when necessary.



 Comments   
Comment by Githook User [ 16/Jun/22 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-67273 Add feature flag to always create config.transactions index on step up

(cherry picked from commit 389d799f96c23cd534aa5c8b3a52e181d7f99ebc)
Branch: v6.0
https://github.com/mongodb/mongo/commit/c48357dadc2df9d65dfe4da6ca9cf285f095b967

Comment by Githook User [ 14/Jun/22 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-67273 Add feature flag to always create config.transactions index on step up
Branch: master
https://github.com/mongodb/mongo/commit/389d799f96c23cd534aa5c8b3a52e181d7f99ebc

Comment by Jack Mulrow [ 14/Jun/22 ]

CC cheahuychou.mao@mongodb.com, milkie@mongodb.com, james.heppenstall@mongodb.com 

Generated at Thu Feb 08 06:07:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.