[SERVER-79088] Improve SBE multi-planner performance for query which returns zero results Created: 18/Jul/23  Updated: 13/Nov/23  Resolved: 06/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.3

Type: Improvement Priority: Major - P3
Reporter: Zixuan Zhuang Assignee: Rui Liu
Resolution: Fixed Votes: 0
Labels: auto-reverted, query-director-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2023-09-19 at 1.41.24 PM.png    
Issue Links:
Backports
Depends
Problem/Incident
Related
related to SERVER-81637 Trial metrics should use boost::optio... Backlog
is related to MONGOID-5030 Opinionated short-circuiting of speci... Backlog
Assigned Teams:
Query Execution
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Sprint: QE 2023-09-18, QE 2023-10-02, QE 2023-10-16
Participants:
Case:
Linked BF Score: 170

 Description   

A $in query with multiple index choice and empty result is much slower after 6.3 upgrade, from the explain output we can tell that the problem is from SBE multi-planner. One of the predicate is an empty $in predicate descriptionRef:{ $in: []}{}, we should think about whether there's anything we can do to improve the performance of the multi-planner in this scenario.



 Comments   
Comment by Johnny Shields [ 20/Oct/23 ]

Please mark this ticket as a "bug", it is not merely an "improvement". It brought down our production cluster when we upgraded.

Comment by Githook User [ 05/Oct/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled

(cherry picked from commit b28e5ba7904666a2360efcf418467a111b64d82a)
Branch: v7.0
https://github.com/mongodb/mongo/commit/297f5bfdb599634fe65dccbb601f15191605202e

Comment by Githook User [ 05/Oct/23 ]

Author:

{'name': 'Liubov Molchanova', 'email': 'liubov.molchanova@mongodb.com', 'username': 'liubov-molchanova'}

Message: Revert "SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled"

This reverts commit 7fa8693d23384315fd40f24e8fb1b2c2f35c0a7f.
Branch: v7.0
https://github.com/mongodb/mongo/commit/0249f04c58050a249709c2021b045b65504ce470

Comment by Githook User [ 05/Oct/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled

(cherry picked from commit b28e5ba7904666a2360efcf418467a111b64d82a)
Branch: v7.0
https://github.com/mongodb/mongo/commit/7fa8693d23384315fd40f24e8fb1b2c2f35c0a7f

Comment by Githook User [ 03/Oct/23 ]

Author:

{'name': 'Rui Liu', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled
Branch: master
https://github.com/mongodb/mongo/commit/b28e5ba7904666a2360efcf418467a111b64d82a

Comment by xgen-buildbaron-user [ 02/Oct/23 ]

Ticket re-opened due to revert. crypt_create_lib began a consistent failure of crypt_create_lib

Comment by Githook User [ 02/Oct/23 ]

Author:

{'name': 'auto-revert-processor', 'email': 'dev-prod-dag@mongodb.com', 'username': ''}

Message: Revert "SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled"

This reverts commit 3d7452026a6a49e0f4b2c4f8dd92fc7658e51a93.
Branch: master
https://github.com/mongodb/mongo/commit/052776fef6b65c2432e1b5412477d7fb65ecc4cb

Comment by Githook User [ 02/Oct/23 ]

Author:

{'name': 'lriuui0x0@gmail.com', 'email': 'lriuui0x0@gmail.com', 'username': 'lriuui0x0'}

Message: SERVER-79088 Fix SBE multi-planner bug that the max read bound can drop to zero and disabled
Branch: master
https://github.com/mongodb/mongo/commit/3d7452026a6a49e0f4b2c4f8dd92fc7658e51a93

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