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

DOCSP-39699: Bulk writes #83

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Aug 29, 2024

Continuing off this unfinished PR opened by Angela, whose internship has since ended. Recreated the PR to get it working with the staging site autobuilder.

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-39699
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/java-rs/DOCSP-39699-bulk-write-2/write/bulk-writes/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for docs-java-rs ready!

Name Link
🔨 Latest commit 1263d30
🔍 Latest deploy log https://app.netlify.com/sites/docs-java-rs/deploys/66e0471816cf3800084a9e23
😎 Deploy Preview https://deploy-preview-83--docs-java-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGTM w/ one small change

~~~~~~~~~~~~~~~~~~

A replace operation removes all fields and values of a specified document, aside from
the ``_id field``, and replaces them with new ones. To perform a replace operation, create
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
the ``_id field``, and replaces them with new ones. To perform a replace operation, create
the ``_id`` field, and replaces them with new ones. To perform a replace operation, create

@mcmorisi mcmorisi requested a review from stIncMale August 29, 2024 15:20
@rozza rozza requested review from rozza and removed request for stIncMale September 10, 2024 08:22
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.

One nit and one question.


BulkWriteResult bulkResult = Mono.from(bulkWritePublisher).block();

System.out.printf(bulkResult.toString());
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Use System.out.println instead of printf

Replace all instances.

// start-bulk-replace-one
ReplaceOneModel<Document> operation = new ReplaceOneModel<>(
eq("restaurant_id", "1234"),
new Document("name", "Mongo's Pizza"));
Copy link
Member

Choose a reason for hiding this comment

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

This example seems a little artificial, as it replaces the whole document you'd lose the restaurant_id is that desired?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will tweak the example to something in line with the example in the server manual.

@mcmorisi mcmorisi requested a review from rozza September 10, 2024 13:18
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

@mcmorisi mcmorisi merged commit f9e7151 into mongodb:main Sep 10, 2024
5 checks passed
@mcmorisi mcmorisi deleted the DOCSP-39699-bulk-write-2 branch September 10, 2024 15:54
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