-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
BF-44610 tracks a regression introduced by the IFR improvements for 9.0 project, which added the generic IFRContext wire API to propagate feature-flag state from routers to shards on every command. The regression was accepted for 9.0/master since it was relatively small and cannot be entirely removed but some ideas to mitigate are:
- Lazy opCtx default, moving the shard-server default context into the opCtx decoration's own lazy initializer instead of reassigning it every command. Recovers ~66 instr/cmd
- In combination with refactoring the IFR propagation mechanism to get rid of the distinction of serialize_on_outgoing_requests, wire find (and other non-agg commands) to the opCtx's coordinated IFRContext and make the shard template copy-on-write. Currently, find always writes on first flag check (its flags aren't in the pre-coordinated set), so COW would just relocate the clone to first-touch rather than avoid it which is why the refactor would be needed.