Skip to content

Add Javadoc to specify that CSOT does not limit socket writes#1791

Open
vbabanin wants to merge 4 commits intomongodb:mainfrom
vbabanin:JAVA-5569
Open

Add Javadoc to specify that CSOT does not limit socket writes#1791
vbabanin wants to merge 4 commits intomongodb:mainfrom
vbabanin:JAVA-5569

Conversation

@vbabanin
Copy link
Member

@vbabanin vbabanin requested a review from a team as a code owner August 15, 2025 01:03
@vbabanin vbabanin requested review from stIncMale and removed request for a team August 15, 2025 01:03
@vbabanin vbabanin changed the title Add Javadoc to specify that CSOT does not limit socket writes in sync… Add Javadoc to specify that CSOT does not limit socket writes Aug 15, 2025
@vbabanin vbabanin marked this pull request as draft August 20, 2025 19:39
@vbabanin vbabanin self-assigned this Dec 11, 2025
# Conflicts:
#	driver-core/src/test/resources/specifications
JAVA-5569
@vbabanin vbabanin marked this pull request as ready for review January 26, 2026 16:13
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.

The last reviewed commit is c331d15.

* <li>{@code > 0} The time limit to use for the full execution of an operation.</li>
* </ul>
*
* <p><strong>Note:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the rest of the API notes in this class, then we should say

Suggested change
* <p><strong>Note:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
* <p>Note that this timeout does not limit socket writes, therefore there is a possibility that the

* <li>{@code > 0} The time limit to use for the full execution of an operation.</li>
* </ul>
*
* <p><strong>NOTE:</strong> When using synchronous API, this timeout does not limit socket writes, therefore there is a possibility that the
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the majority of API notes in the com.mongodb package, we should say <p>Note: When....

The same suggestion applies to the rest of the driver-core/src/main/com/mongodb files modified in the PR.

* </ul>
*
* <p><strong>Note:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
* operation might not be timed out when expected.
Copy link
Member

Choose a reason for hiding this comment

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

We should also add this note to the MongoClientOptions.getTimeout method.

* </ul>
*
* <p><strong>NOTE:</strong> When using synchronous API, this timeout does not limit socket writes, therefore there is a possibility that the
* operation might not be timed out when expected. This limitation does not apply to the reactive streams API.
Copy link
Member

Choose a reason for hiding this comment

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

We should also add this note to the MongoClientSettings.getTimeout method.

The same suggestion applies to the rest of the driver-core/src/main/com/mongodb files modified in the PR.

* <li>{@code > 0} The time limit to use for the full execution of an operation.</li>
* </ul>
*
* <p><strong>NOTE:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the majority of API notes in the com.mongodb package, we should say <p>Note: This....

The same suggestion applies to the GridFSBucket.withTimeout method.

* - `0` means infinite timeout.
* - `> 0` The time limit to use for the full execution of an operation.
*
* <p><strong>NOTE:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the majority of API notes in the com.mongodb.kotlin.client package, we should say Note: This.... (Kotlin does not seen to require HTML in documentation comments).

The same suggestion applies to the MongoCluster.withTimeout method and to rest of the driver-kotlin-sync/src/main/kotlin/com/mongodb/kotlin/client files modified in the PR.

* <li>{@code > 0} The time limit to use for the full execution of an operation.</li>
* </ul>
*
* <p><strong>NOTE:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the majority of API notes in the com.mongodb.client package, we should say <p>Note: This....

The same suggestion applies to the rest of the driver-sync/src/main/com/mongodb/client files modified in the PR.

* </ul>
*
* <p><strong>NOTE:</strong> This timeout does not limit socket writes, therefore there is a possibility that the
* operation might not be timed out when expected.
Copy link
Member

Choose a reason for hiding this comment

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

We should also add this note to the MongoCluster.getTimeout method.

The same suggestion applies to the rest of the driver-sync/src/main/com/mongodb/client files modified in the PR.

Copy link
Member

Choose a reason for hiding this comment

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

We should revert the changes to driver-core/src/test/resources/specifications

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