Repository navigation
Allow OtherDoi, Event, and Activity shard configuration - #1605
Merged
Merged
Conversation
Add NUMBER_OF_SHARDS_OTHER_DOI, NUMBER_OF_SHARDS_EVENT, and NUMBER_OF_SHARDS_ACTIVITY, each defaulting to 5. Apply them on the model settings used when those indices are created, and keep the shared Doi settings free of a shard override. Co-authored-by: Joseph Rhoads <jrhoads@users.noreply.github.com>
Mirror the DataciteDoi shard specs: default of 5, isolation from shared Doi settings, and index template settings for each model. Co-authored-by: Joseph Rhoads <jrhoads@users.noreply.github.com>
jrhoads
marked this pull request as ready for review
October 5, 2026 08:46
digitaldogsbody
approved these changes
Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Make OtherDoi, Event, and Activity OpenSearch shard counts configurable, using the same pattern as DataciteDoi.
Approach
Add an environment variable for each index, defaulting to 5, and apply that value as
number_of_shardson the model settings used when the index or template is created. Shared Doi settings stay without a shard override, and each model keeps its own settings.Key Modifications
NUMBER_OF_SHARDS_OTHER_DOI,NUMBER_OF_SHARDS_EVENT, andNUMBER_OF_SHARDS_ACTIVITYto"5"inconfig/application.rb, alongsideNUMBER_OF_SHARDS_DATACITE_DOI.NUMBER_OF_SHARDS_OTHER_DOI.OtherDoi.settingsso the shard count is included when that template is applied.number_of_shardsfrom their own environment variables, leaving their mappings in place.Important Technical Details
number_of_shardsapplies only when an index is created. Existing OtherDoi, Event, and Activity indices keep their current shard count until they are recreated (for example viaupgrade_indexor a new index and alias switch).config/application.rbwith||= "5"and converted with.to_iwhen the model settings are defined, matchingNUMBER_OF_SHARDS_DATACITE_DOI.Doi.settingsstill has nonumber_of_shards. DataciteDoi continues to useNUMBER_OF_SHARDS_DATACITE_DOI. OtherDoi copies the Doi index analysis settings and adds its own shard count, so the Datacite and Other DOI indices can be sized independently.settingsandmappings.Types of changes
Reviewer, please remember our guidelines: