[SERVER-52909] Nonexistent class VoteCommitImportCollection is declared a friend of UUID class Created: 17/Nov/20  Updated: 27/Oct/23  Resolved: 08/Oct/21

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Trivial - P5
Reporter: A. Jesse Jiryu Davis Assignee: Backlog - Replication Team
Resolution: Works as Designed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-43964 requirement that IDL types be friends... Closed
Assigned Teams:
Replication
Participants:

 Description   

The UUID class's default constructor is private. Since IDL-generated classes use the default constructor, they're all manually declared friends of UUID. One of them is an imaginary friend, however: VoteCommitImportCollection does not exist.

https://github.com/mongodb/mongo/blob/r4.4.1/src/mongo/util/uuid.h#L91

While we're fixing that, remove the "friend class LogicalSessionId" declaration from UUID's "private" section, since it's duplicated in the public section. Everyone knows they're friends now, UUID doesn't have to be ashamed of LogicalSessionId anymore.



 Comments   
Comment by Esha Maharishi (Inactive) [ 08/Oct/21 ]

Closing as Works as Designed - VoteCommitImportCollection exists in the enterprise module:

$ egrep -rIn VoteCommitImportCollection
src/mongo/db/modules/enterprise/jstests/live_import/secondary_dryrun_vote_timeout.js:36:let failPoint = configureFailPoint(primary, "hangVoteCommitImportCollectionCommand");
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection.idl:15:    cpp_name: VoteCommitImportCollection
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection_command.cpp:20:MONGO_FAIL_POINT_DEFINE(hangVoteCommitImportCollectionCommand);
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection_command.cpp:32:class VoteCommitImportCollectionCommand final
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection_command.cpp:33:    : public TypedCommand<VoteCommitImportCollectionCommand> {
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection_command.cpp:35:    using Request = VoteCommitImportCollection;
src/mongo/db/modules/enterprise/src/live_import/commands/vote_commit_import_collection_command.cpp:66:            hangVoteCommitImportCollectionCommand.pauseWhileSet();

Also, SERVER-43964 fixed the UUID/LogicalSessionId friend issue.

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