Skip to content

Deprecate options: maxTimeMS, maxCommitTimeMS for CRUD methods. #1277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 4, 2024

Conversation

vbabanin
Copy link
Member

@vbabanin vbabanin commented Dec 9, 2023

The following options for CRUD methods are deprecated in favor of timeoutMS:

  • maxTimeMS
  • maxCommitTimeMS

Specification: CRUD

JAVA-5264

@vbabanin vbabanin requested a review from rozza December 9, 2023 02:33
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

Looking good - Can you also add some @SuppressWarnings("deprecation") to the code, to quieten down the deprecation warnings when compiling.

@vbabanin
Copy link
Member Author

vbabanin commented Dec 13, 2023

Looking good - Can you also add some @SuppressWarnings("deprecation") to the code, to quieten down the deprecation warnings when compiling.

Done, thanks! I've added the @SuppressWarnings("deprecation")/@Suppress("DEPRECATION) annotations.

@vbabanin vbabanin requested a review from rozza December 13, 2023 21:14
@rozza
Copy link
Member

rozza commented Dec 14, 2023

./gradlew clean check --continue -xtest -xintegrationTest still reports lots of warnings

@@ -39,7 +39,7 @@ internal class SyncAggregateIterable<T : Any>(val wrapped: AggregateIterable<T>)
}

override fun maxTime(maxTime: Long, timeUnit: TimeUnit): SyncAggregateIterable<T> = apply {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would have just annoatated the whole method

Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

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

LGTM

@vbabanin vbabanin merged commit 1a3e3a8 into mongodb:CSOT Jan 4, 2024
@vbabanin vbabanin deleted the JAVA-5264 branch January 4, 2024 03:55
vbabanin added a commit to vbabanin/mongo-java-driver that referenced this pull request Apr 17, 2024
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