MakeDataCount API may end up in infinite loop#11535
Merged
ofahimIQSS merged 2 commits intoIQSS:developfrom Jul 23, 2025
Merged
Conversation
…ase of many calls
stevenwinship
approved these changes
Jun 16, 2025
Contributor
|
looks good - merging |
luddaniel
added a commit
to Recherche-Data-Gouv/dataverse
that referenced
this pull request
Dec 2, 2025
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.
Hi everyone :)
Our team identified a issue with
api/admin/makeDataCount/:persistentId/updateCitationsForDataset?persistentId=$DOIthat could end up in infinite loop if Datacite result is paginated.While using Datacite API pagination by page number + using
nextlink : it will keep sending the same content page after page 10 andnextlink will exists forever.Moreover, using this method is limited to a retrieve of 10,000 records (After page 10, all pages display page content of page n°10)
Ex:
First page : https://api.datacite.org/events?doi=10.12763/SMDGR1&source=crossref&page[size]=1000
Page number 11 : https://api.datacite.org/events?doi=10.12763%2FSMDGR1&page%5Bnumber%5D=11&page%5Bsize%5D=1000
Still displays a next link :
This code is now using Datacite API pagination by Cursor that will remove
nextlink at last page, fixing the infinite loop issue while increasing the search capability to its maximum.