Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Nov 20, 2025

@rozza rozza requested a review from stIncMale November 20, 2025 15:01
@rozza rozza requested a review from a team as a code owner November 20, 2025 15:02
@rozza
Copy link
Member Author

rozza commented Nov 20, 2025

Replaces #1825 with the bare minimum change to allow NettyByteBuf's to be able to log / have tracing.

Without the duplication in asReadOnly the proxied Netty ByteBuf gets released when the byteBuffers are released in getCommandDocument(final ByteBufferBsonOutput bsonOutput).

@rozza
Copy link
Member Author

rozza commented Nov 20, 2025

I have added the following tickets:

  • JAVA-6009 To address ByteBuf retention implementations
  • JAVA-6010 To review ByteBufBsonDocument never releasing its ByteBuf
  • JAVA-6011 to review some issues with logging / tracing of command document that could be improved.

@rozza rozza changed the title CompositeByteBuf#duplicate should duplicate underlying buffers Implement NettyByteBuf.asReadOnly Nov 20, 2025
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

@rozza, in #1825 you replaced CompositeByteBufSpecification.groovy with CompositeByteBufTest.java. Let's keep that change in this PR to avoid wasting that good effort?

The last reviewed commit is d175d01.

@rozza
Copy link
Member Author

rozza commented Nov 27, 2025

@stIncMale done

@rozza rozza requested a review from stIncMale November 27, 2025 09:29
Copy link
Member

@stIncMale stIncMale left a comment

Choose a reason for hiding this comment

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

There is only one small thing. Ross, feel free to merge after that.

The last reviewed commit is 9f2782e.

…ositeByteBufTest.java

Co-authored-by: Valentin Kovalenko <[email protected]>
@rozza rozza requested a review from stIncMale December 1, 2025 09:00
@rozza
Copy link
Member Author

rozza commented Dec 1, 2025

@stIncMale cannot merge unless this gets an LGTM and passes all evergreen checks

@rozza rozza merged commit 057649f into mongodb:main Dec 2, 2025
56 checks passed
@rozza rozza deleted the JAVA-5892-min branch December 2, 2025 09:14
rozza added a commit to rozza/mongo-java-driver that referenced this pull request Dec 2, 2025
CompositeByteBuf#duplicate should duplicate underlying buffers

JAVA-5982

---------

Co-authored-by: Valentin Kovalenko <[email protected]>
rozza added a commit that referenced this pull request Dec 3, 2025
CompositeByteBuf#duplicate should duplicate underlying buffers

JAVA-5982

---------

Co-authored-by: Valentin Kovalenko <[email protected]>
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