[SERVER-58587] Improve performance of $setIsSubset by replacing std::set with an unordered set Created: 15/Jul/21  Updated: 29/Oct/23  Resolved: 05/Aug/21

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

Type: New Feature Priority: Major - P3
Reporter: Arun Banala Assignee: Rui Liu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File patch-1    
Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4
Sprint: QE 2021-08-09
Participants:

 Description   

The $setIsSubset currently uses std::set to creating a lookup table on the RHS array elements. We should replace this with stdx::unordered_set which provides 3-4x performance for large data sets.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 06/Aug/21 ]

Author:

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

Message: SERVER-58587 Improve performance of $setIsSubset by replacing std::set with an unordered set

(cherry picked from commit f0defdba5d5839e4cbfd3b0fa69fb8369419ded4)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0df1ecc5133a17f8af0b58079f6ef8c910970739

Comment by Githook User [ 05/Aug/21 ]

Author:

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

Message: SERVER-58587 Improve performance of $setIsSubset by replacing std::set with an unordered set

(cherry picked from commit f0defdba5d5839e4cbfd3b0fa69fb8369419ded4)
Branch: v5.0
https://github.com/mongodb/mongo/commit/900f813705c5eb7b6ba6260ec78be7880c866934

Comment by Githook User [ 04/Aug/21 ]

Author:

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

Message: SERVER-58587 Improve performance of $setIsSubset by replacing std::set with an unordered set
Branch: master
https://github.com/mongodb/mongo/commit/f0defdba5d5839e4cbfd3b0fa69fb8369419ded4

Comment by Rushan Chen [ 22/Jul/21 ]

For Rui's 2nd ticket. Detailed explaination in the HELP ticket.

Generated at Thu Feb 08 05:44:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.