Skip to content

CSOT: Ignore wTimeoutMS #1368

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 8 commits into from
Apr 22, 2024
Merged

CSOT: Ignore wTimeoutMS #1368

merged 8 commits into from
Apr 22, 2024

Conversation

vbabanin
Copy link
Member

JAVA-4062
JAVA-4062
# Conflicts:
#	driver-core/src/main/com/mongodb/internal/async/function/RetryState.java
#	driver-sync/src/test/functional/com/mongodb/client/ClientSideOperationTimeoutTest.java
@@ -25,7 +25,7 @@
import java.util.function.Supplier;

/**
* <p>Design by contract assertions.</p> <p>This class is not part of the public API and may be removed or changed at any time.</p>
Copy link
Member Author

@vbabanin vbabanin Apr 17, 2024

Choose a reason for hiding this comment

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

This statement appears to be a duplicate of the one found on line 36.

@@ -203,7 +203,7 @@ private void doAdvanceOrThrow(final Throwable attemptException,
*/
if (hasTimeoutMs() && !loopState.isLastIteration()) {
previouslyChosenException = createMongoTimeoutException(
"MongoDB operation timed out during a retry attempt",
"Retry attempt timed out.",
previouslyChosenException);
}
Copy link
Member Author

@vbabanin vbabanin Apr 17, 2024

Choose a reason for hiding this comment

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

The retry could be triggered not only by transient errors in MongoDB operations but also within the scope of OIDC. Referring to it as a 'MongoDB operation' might lead to confusion among users.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
JAVA-4062
@vbabanin vbabanin requested a review from rozza April 18, 2024 05:46

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
JAVA-4062
@vbabanin vbabanin marked this pull request as ready for review April 19, 2024 05:09
@Tag("setsFailPoint")
@Test
@DisplayName("Should ignore wTimeoutMS of WriteConcern to initial and subsequent commitTransaction operations")
@Disabled //TODO JAVA-5425
Copy link
Member Author

Choose a reason for hiding this comment

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

An observation from JAVA-5425: TimeoutContext is null in subsequent commitTransaction operations.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch

@vbabanin vbabanin self-assigned this Apr 19, 2024
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!

@@ -228,4 +238,8 @@ protected TimeoutSettings getTimeoutSettings(final TransactionOptions transactio
.withMaxCommitMS(transactionOptions.getMaxCommitTime(MILLISECONDS))
.withTimeout(timeoutMS, MILLISECONDS);
}

protected enum TransactionState {
Copy link
Member

Choose a reason for hiding this comment

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

👍

@Tag("setsFailPoint")
@Test
@DisplayName("Should ignore wTimeoutMS of WriteConcern to initial and subsequent commitTransaction operations")
@Disabled //TODO JAVA-5425
Copy link
Member

Choose a reason for hiding this comment

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

Good catch

@vbabanin vbabanin merged commit 4a15e31 into mongodb:CSOT Apr 22, 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.

None yet

2 participants