Skip to content

Use pagination when updating CrisMetric records in index - #516

Open
kshepherd wants to merge 1 commit into
4Science:main-crisfrom
the-library-code:metric-update-pagination
Open

Use pagination when updating CrisMetric records in index#516
kshepherd wants to merge 1 commit into
4Science:main-crisfrom
the-library-code:metric-update-pagination

Conversation

@kshepherd

Copy link
Copy Markdown

The UpdateCrisMetricsInSolrDocService update method tries to read all metrics at once before processing and updating the index.
In a system with a very large number of CrisMetrics DB rows, this can cause heap space errors.

This small PR adds a default page size of 1000 and reads pages in a while loop.

@kshepherd
kshepherd force-pushed the metric-update-pagination branch from 5d4d725 to ba5b164 Compare August 12, 2025 14:10
@kshepherd
kshepherd marked this pull request as ready for review August 12, 2025 14:11
@kshepherd
kshepherd force-pushed the metric-update-pagination branch from ba5b164 to 8a9d0f8 Compare August 12, 2025 18:33
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
activity in one year. It will be closed in 14 days if no further activity occurs.

Allowing pull requests to close as stale helps us filter out old work that is no longer
relevant and helps developers focus on reviewing current work.

All pull requests closed by this bot act like normal pull requests;
they can be searched for, commented on or reopened at any point.

If these changes are still relevant then please comment and/or rebase your PR based on the
latest DSpace code. This will remove the stale status and notify us to assign a reviewer
for your PR.

@github-actions github-actions Bot added the stale label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant