[SERVER-78767] Replace std::ranges::sample usage with std::sample for C++17 compliance Created: 07/Jul/23  Updated: 29/Oct/23  Resolved: 07/Jul/23

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

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

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-07-10
Participants:
Linked BF Score: 165

 Description   

SERVER-78052 introduced a usage of std::ranges::sample that is supported starting from C++20. Since there are some build variants still compiling following the C++17 standard, replace it with std::sample.



 Comments   
Comment by Githook User [ 10/Jul/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-78052 + SERVER-78767 Adapt `commitMergeAllChunksOnShard` to take into account zones
Branch: v7.0
https://github.com/mongodb/mongo/commit/9eee01c3bd439752e5c3c7d6164dd605cd6a71d8

Comment by Githook User [ 07/Jul/23 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-78767 Replace std::ranges::sample usage with std::sample for C++17 compliance
Branch: master
https://github.com/mongodb/mongo/commit/eb236478987daa712eac7a9f17907f96fc67cbf8

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