[JAVA-5204] Remove unused remnants of OP_REPLY Created: 17/Oct/23  Updated: 05/Dec/23  Resolved: 06/Nov/23

Status: Closed
Project: Java Driver
Component/s: Internal, Wire Protocol
Affects Version/s: None
Fix Version/s: 5.0.0

Type: Improvement Priority: Minor - P4
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

In the old wire protocol, the server responded to all wire protocol messages with an OP_REPLY wire protocol message.  With OPM_MSG, the server now responds with OP_MSG.  The only remaining driver functionality that requires OP_REPLY handling is the initial handshake, which is still initiated with OP_QUERY.

However, the driver still has code in both ReplyHeader and ReplyMessage that handles the full range of OP_REPLY responses.  That code is unused except in tests and can be removed. 



 Comments   
Comment by Githook User [ 05/Dec/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove dead code in ReplyHeader (#1231)

The dead code is a remnant of when the driver supported the
full range of OP_REPLY wire protocol message usage. Since the driver
now only runs against MongoDB releases that support OP_MSG,
OP_REPLY is only used for the response to the `hello` command
in the handshake, and therefore most of the OP_REPLY-handling code is
no longer on any execution paths.

JAVA-5204
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/f91175b0d59fd218fcc447e5993d01015ac51f21

Comment by Githook User [ 20/Nov/23 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Remove dead code in ReplyHeader (#1231)

The dead code is a remnant of when the driver supported the
full range of OP_REPLY wire protocol message usage. Since the driver
now only runs against MongoDB releases that support OP_MSG,
OP_REPLY is only used for the response to the `hello` command
in the handshake, and therefore most of the OP_REPLY-handling code is
no longer on any execution paths.

JAVA-5204
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/a157cbf7fca11204c631697b333dc0ec703e8bfa

Generated at Thu Feb 08 09:04:00 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.