-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Reuse ConnectionSource to avoid extra server selection. #1813
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
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # driver-core/src/main/com/mongodb/internal/operation/ChangeStreamBatchCursor.java # driver-core/src/main/com/mongodb/internal/operation/SyncOperationHelper.java # driver-core/src/test/unit/com/mongodb/internal/operation/ChangeStreamBatchCursorTest.java
rozza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkstyle nits - will remove and re run the tests.
driver-core/src/test/unit/com/mongodb/internal/operation/ChangeStreamBatchCursorTest.java
Outdated
Show resolved
Hide resolved
driver-core/src/test/unit/com/mongodb/internal/operation/ChangeStreamBatchCursorTest.java
Outdated
Show resolved
Hide resolved
| protected abstract MongoClient createMongoClient(MongoClientSettings mongoClientSettings); | ||
|
|
||
| @Test | ||
| public void shouldDoOneServerSelectionForResumeAttempt() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to have failed a couple of times in the tests:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, 10107 error code (MongoNotPrimaryException) that was returned from failPoint marked a primary as UNKNOWN, so it caused multiple server selections until the server monitor discovered the primary. I have changed to a different retryable error code - 9001.
All tests pass now.
JAVA-5974