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

Align OtherDoi bulk indexing with DataciteDoi bulk indexing. #1187

Open
wants to merge 1 commit into
base: 04-19-add_skip_client_lookup_option_when_indexing_all_datacite_dois
Choose a base branch
from

Conversation

jrhoads
Copy link
Contributor

@jrhoads jrhoads commented Apr 30, 2024

Purpose

This pull request includes changes to the other_doi.rb file that aim to refactor and improve the 'import_in_bulk' method.

What changed?

The import_in_bulk method within the other_doi.rb file is now broken down into smaller responsibilities. In the updated method, database records are retrieved from an array of database ids, which are subsequently uploaded to Elasticsearch in batches. This approach aids in preventing the creation of bulk requests to Elasticsearch that are too large. Moreover, error handling and logging have been enhanced.

How to test?

These changes can be tested by running the import_in_bulk method with a large amount of database ids. It should handle the request smoothly, without any bulk request size issues.

Why make this change?

These changes enhance scalability by accommodating larger amounts of database ids for Elasticsearch indexing. Also, they improve the overall readability and maintainability of the codebase.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

  • New feature (non-breaking change which adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to change)

Reviewer, please remember our guidelines:

  • Be humble in the language and feedback you give, ask don't tell.
  • Consider using positive language as opposed to neutral when offering feedback. This is to avoid the negative bias that can occur with neutral language appearing negative.
  • Offer suggestions on how to improve code e.g. simplification or expanding clarity.
  • Ensure you give reasons for the changes you are proposing.

@jrhoads
Copy link
Contributor Author

jrhoads commented Apr 30, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jrhoads and the rest of your teammates on Graphite Graphite

@jrhoads jrhoads changed the title Align OtherDoi bulk upload with DataciteDoi bulk upload. Align OtherDoi bulk indexing with DataciteDoi bulk indexing. Apr 30, 2024
@jrhoads jrhoads marked this pull request as ready for review April 30, 2024 13:59
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

1 participant