[SERVER-42649] Use Value instead of BSONObj in the in-memory sort key Created: 06/Aug/19  Updated: 29/Oct/23  Resolved: 26/Sep/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: Mikhail Ivkov (Inactive) Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-08-26, Query 2019-09-09, Query 2019-09-23, Query 2019-10-07
Participants:
Linked BF Score: 83

 Comments   
Comment by Githook User [ 27/Sep/19 ]

Author:

{'name': 'Justin Seyster', 'username': 'jseyster', 'email': 'justin.seyster@mongodb.com'}

Message: SERVER-42649 Disambiguate Value constructor

The Xcode 10.2 Clang considers

{Value(), Value()}

constructors to be ambiguous:
src/mongo/dbtests/query_stage_sort_key_generator.cpp:137:11: error: call to constructor of 'mongo::Value' is ambiguous
Value expectedOut(

{Value(99), Value(16)}

);
^ ~~~~~~~~~~~~~~~~~~~~~~
src/mongo/db/pipeline/value.h:103:14: note: candidate constructor
explicit Value(const std::string& value) : _storage(String, StringData(value)) {}
^
src/mongo/db/pipeline/value.h:109:14: note: candidate constructor
explicit Value(std::vector<Value> vec)

This patch uses an explicit std::vector<Value> constructor to fix macOS compiles.
Branch: master
https://github.com/mongodb/mongo/commit/81deec4580a95475ed906ec5840290e003663b38

Comment by David Storch [ 26/Sep/19 ]

justin.seyster can this ticket be closed?

Comment by Githook User [ 26/Sep/19 ]

Author:

{'name': 'Justin Seyster', 'username': 'jseyster', 'email': 'justin.seyster@mongodb.com'}

Message: SERVER-42649 Use Value instead of BSONObj in the in-memory sort key
Branch: master
https://github.com/mongodb/mongo/commit/c5540ac7d3ceb7c6ce8ff5a3354d80f3eb09dbf1

Comment by Githook User [ 26/Sep/19 ]

Author:

{'name': 'Justin Seyster', 'username': 'jseyster', 'email': 'justin.seyster@mongodb.com'}

Message: SERVER-42649 Use Value instead of BSONObj in the in-memory sort key
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/22133f0f4c9456a79a9ab9c8ecc3c83ec883c6c3

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