SERVER-109985ClosedDuplicate
Idea: feature flag improvement for MQL and wire protocol changes
h2. Background Consider a server change like SERVER-91281 which wants to add a new option to the $sort stage to understand/accept a new option 'outputSortKeyMetadata: true/false'. This is challenging to roll out in the face of a rolling upgrade/downgrade. If you want to use this new option for optimizations (for example, $setWindowFields would like to take advantage of this), you need to be careful to only do so when you know that any node (mongod) participating in the query will understan