Skip to content
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

Implement Java sync improved bulk write API and unified spec tests #1486

Merged
merged 76 commits into from
Sep 24, 2024

Conversation

stIncMale
Copy link
Member

@stIncMale stIncMale commented Aug 22, 2024

The first three commits are well-organized to allow reviewing them one by one.

This PR depends on #1458.

The following test runners execute the unified and prose tests added in this PR:

  • com.mongodb.client.unified.VersionedApiTest
  • com.mongodb.client.unified.UnifiedTransactionsTest
  • com.mongodb.client.unified.ServerSelectionLoggingTest
  • com.mongodb.client.unified.UnifiedRetryableWritesTest
  • com.mongodb.client.unified.CommandMonitoringTest
  • com.mongodb.client.unified.UnifiedCrudTest
  • com.mongodb.client.CrudProseTest

JAVA-5528
JAVA-5609

@stIncMale stIncMale requested review from rozza and jyemin August 22, 2024 18:02
@stIncMale stIncMale self-assigned this Aug 22, 2024
@stIncMale stIncMale marked this pull request as draft August 22, 2024 18:07
@stIncMale stIncMale marked this pull request as ready for review August 22, 2024 18:13
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.

Looks really good.

Just had a couple of suggestions. Less worried about the TODO's but I do recommend summarizing the slack discussion in the comment.

final Runnable ifCommandIsRetryable) {
// BULK-TODO This implementation must limit the number of `models` it includes in a batch if needed.
// Each batch re-selects a server and re-checks out a connection because this is simpler and it is allowed,
// see https://mongodb.slack.com/archives/C035ZJL6CQN/p1722265720037099?thread_ts=1722264610.664109&cid=C035ZJL6CQN.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: These archives will be lost over time, so recommend adding a tldr here instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 14bb86e. I moved the comment, and linked the relevant DRIVERS ticket there (the ticket will not be done, but it has the relevant discussion).

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

}
},
{
"name": "bulkWrite",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be clientBulkWrite? When I run locally this test fails looking for a collection named client.

Copy link
Member Author

@stIncMale stIncMale Sep 16, 2024

Choose a reason for hiding this comment

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

Thank you, it should. It haven't noticed this because I've been only running tests against a replica set, where this test is skipped. This is how it's in the spec, so I'll file a relevant DRIVERS ticket

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@jyemin Could you please move https://jira.mongodb.org/browse/DRIVERS-2978 to "Ready for work"? I don't have the permission to do that.

@stIncMale stIncMale changed the base branch from JAVA-5527 to JAVA-4586_bulk-write September 24, 2024 10:03
@stIncMale stIncMale merged commit fc65ad9 into mongodb:JAVA-4586_bulk-write Sep 24, 2024
2 checks passed
@stIncMale stIncMale deleted the JAVA-5528 branch September 24, 2024 10:22
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.

3 participants