[SERVER-85920] Remove determineBonsaiEligibility from the hot path of SBE engine Created: 30/Jan/24  Updated: 01/Feb/24  Resolved: 01/Feb/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Milena Ivanova Assignee: Hana Pearlman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File FindProjectionThreeFields_sbe.svg    
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Participants:

 Description   

When running mongod with internalQueryFrameworkControl=trySbeEngine the server seems to spend unnecessary time in determineBonsaiEligibility function (under getExecutorFind).

In the attached flame graph of FindProjectionThreeFields benchmark over a 100-document collection the function takes 3.11% (out of 9.28% for getExecutorFind).

For larger collections this is probably a smaller issue, but it looks like unnecessary overhead for small collections queries. 



 Comments   
Comment by Githook User [ 01/Feb/24 ]

Author:

{'name': 'HanaPearlman', 'email': 'hana.pearlman@mongodb.com', 'username': 'HanaPearlman'}

Message: SERVER-85920: Check if Bonsai is enabled earlier in Bonsai eligibilit… (#18527)

SERVER-85920: Check if Bonsai is enabled earlier in
determineBonsaiEligibility
GitOrigin-RevId: faaa62a2f00e460fa158bad67e628d1af9cc7db9
Branch: master
https://github.com/mongodb/mongo/commit/89e490d865c02c5066def49cb40a1187a85a1d40

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