Skip to content

Conversation

jyemin
Copy link
Collaborator

@jyemin jyemin commented Aug 13, 2025

@jyemin jyemin self-assigned this Aug 13, 2025
@jyemin jyemin requested a review from a team as a code owner August 13, 2025 18:12
@jyemin jyemin requested review from NathanQingyangXu and Copilot and removed request for a team August 13, 2025 18:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates the COMMAND_COLLECTION_NAME constant in the MongoNamespace class as part of removing legacy wire protocol support. The constant was used for the deprecated OP_QUERY wire protocol, which has been replaced by OP_MSG.

  • Adds @Deprecated annotation to the COMMAND_COLLECTION_NAME constant
  • Updates the documentation to explain the deprecation reason and that no replacement is needed

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@NathanQingyangXu
Copy link
Contributor

I just found a naming inconsistency in this MongoNamespace class for the following two private methods:

private static String getCollectionNameFullName(final String namespace)

private static String getDatatabaseNameFromFullName(final String namespace)

given they are private methods, it might be great to add the missing From to the first method.
Not a blocker of the PR, just a comment.

@NathanQingyangXu
Copy link
Contributor

Another super minor but more visible issue is the javadoc of this class:

A MongoDB namespace, which includes a database name and collection name.

I think another a is needed before colleciton name.

A MongoDB namespace, which includes a database name and a collection name.

Too trivial for sure.

@jyemin
Copy link
Collaborator Author

jyemin commented Aug 13, 2025

Good catches, but I'm going to leave the PR focused on just the deprecation.

@jyemin jyemin merged commit 4d2682c into mongodb:main Aug 13, 2025
44 of 50 checks passed
@jyemin jyemin deleted the JAVA-5943 branch August 13, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants