Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bulk): Load IDs from list only when necessary #1574

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

kwahlin
Copy link
Contributor

@kwahlin kwahlin commented Mar 17, 2025

When generating changeSets we are only interested in the diff between matchForm and targetForm and thus we don't need to bother with loading ID lists possibly contained in matchForm. Loading ID lists over and over for every call to the bulk preview API is likely the reason for the heap space errors occurring lately.

The key fix is to not provide a Whelk instance here

result.put("changeSets", update.getTransform().getChangeSets());
while the rest is to clarify a bit what's going on when loading IDs.

Copy link
Contributor

@jannistsiroyannis jannistsiroyannis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kwahlin kwahlin merged commit ff05c64 into develop Mar 21, 2025
1 check passed
@kwahlin kwahlin deleted the bugfix/lxl-4639-excessive-id-loading branch March 21, 2025 13:42
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.

None yet

2 participants