Skip to content

Conversation

@codycooperross
Copy link
Contributor

Purpose

RAiD has an integration with ORCID wherein RAiD projects are added to ORCID profiles in a similar way to DataCite's auto-update functionality, though in separate area of the ORCID profile. For users with auto-update enabled, this produces duplicate entries. Because of this, RAiD and ORCID have requested that RAiD DOIs, i.e. DataCite DOIs in a client with client_type raidRegistry, not be added via auto-update.

closes: https://github.com/datacite/product-backlog/issues/512

Approach

Adds include=client to retrieve client data when requesting DOI metadata and merges it into attributes for access in models.

Open Questions and Pre-Merge TODOs

Learning

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.

Copy link
Member

Without being able to look at the code (until I get home), I have a worry that this might increase database load quite a bit because of how Rails loads the client association.

The slow-queries log for the database often has a lot of entries for client queries, and given the volume of records going through event data, I'd like to double check the exact flow before merge just in case we accidentally end up swamping the RDS with a problem that might not show up until production given the difference in scale.

It could be a non-issue, I just don't remember exactly right now. I'll be able to check it out later today when I'm back at my desk.

@codycooperross
Copy link
Contributor Author

codycooperross commented Dec 29, 2025

Thanks for pointing that out, @digitaldogsbody Looking at the slow query logs, it doesn't seem like there are any slow datacentre queries. There are a lot of allocator and contacts queries there, but I don't think these would be called on .client. Example doi.client query: SELECT `datacentre`.* FROM `datacentre` WHERE `datacentre`.`id` = xxxxx LIMIT 1. Either way, I can separate this request pattern out so client data is only requested when nameIdentifiers are present to reduce potential performance impacts. What do you think?

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.

4 participants