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

Fix import and document update functions #71

Open
wants to merge 2 commits into
base: node-18-upgrade
Choose a base branch
from

Conversation

DavidWeiss2
Copy link

Improved Stability in Import and Document Update Operations

This pull request addresses and resolves issues in the import and document update functionalities. The changes implemented aim to enhance the stability and reliability of document writes, significantly reducing the occurrence of failures.

Key Changes:

  • Optimized the import function for better handling of various document formats.
  • Refined the document update mechanism to decrease the likelihood of write failures.

These improvements are expected to offer a more seamless and efficient experience for all users. Your testing and feedback on these changes would be greatly appreciated to ensure we maintain the high standards of the project.

Copy link
Member

@jasonbosco jasonbosco left a comment

Choose a reason for hiding this comment

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

Left some comments

action: "emplace",
dirty_values: "coerce_or_drop",
return_doc: false,
batch_size: batchSize.length,
Copy link
Member

Choose a reason for hiding this comment

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

The batch_size here controls server-side batching, and we do not want to change this from the default in most cases.

Could you remove this?

exports.importDocumentsConfig = (batchSize) => ({
action: "emplace",
dirty_values: "coerce_or_drop",
return_doc: false,
Copy link
Member

Choose a reason for hiding this comment

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

This is a good improvement, I've seen users miss the error returned because we log the document as well.

But could you instead set return_id: true, so at least the document ID is logged for users to investigate further?

…-on-created-documents-or-documents-without-all-fields
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