[SERVER-77500] update_index_data should use btree_set instead of std::set Created: 25/May/23  Updated: 29/Oct/23  Resolved: 31/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc3

Type: Task Priority: Major - P3
Reporter: Colin Stolley Assignee: Colin Stolley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v7.0
Participants:
Linked BF Score: 105

 Description   

update_index_data uses std::set for canonicalPaths and pathComponents, and both of these sets are iterated over quite a bit. The cost of iterating over a std::set's rbtree is not cheap, and can be improved by using absl::btree_set instead.

boost::flat_set was also evaluated, but had worse performance numbers overall compared to btree_set.



 Comments   
Comment by Githook User [ 31/May/23 ]

Author:

{'name': 'Colin Stolley', 'email': 'colin.stolley@mongodb.com', 'username': 'ccstolley'}

Message: SERVER-77500: update_index_data should use btree_set instead of std::set
Branch: v7.0
https://github.com/mongodb/mongo/commit/ed547389e247ce50460ae423abc4ad84cb2ba177

Comment by Githook User [ 31/May/23 ]

Author:

{'name': 'Colin Stolley', 'email': 'colin.stolley@mongodb.com', 'username': 'ccstolley'}

Message: SERVER-77500: update_index_data should use btree_set instead of std::set
Branch: master
https://github.com/mongodb/mongo/commit/7c19c662aa811cc96e20228f5ce3dd1f9ae82db0

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