Skip to content

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
@jrhoads jrhoads closed this Jul 7, 2025
@jrhoads jrhoads deleted the 04-25-align_otherdoi_bulk_upload_with_datacitedoi_bulk_upload branch July 7, 2025 10:49
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.

2 participants