Skip to content

Experimental: build the application without using findDeep() methods#12148

Draft
landreev wants to merge 3 commits intodevelopfrom
prodpatch-no-finddeep
Draft

Experimental: build the application without using findDeep() methods#12148
landreev wants to merge 3 commits intodevelopfrom
prodpatch-no-finddeep

Conversation

@landreev
Copy link
Contributor

@landreev landreev commented Feb 5, 2026

What this PR does / why we need it:

As an experiment, this switches back to using "normal" EJB instantiations of datasets/versions, bypassing findDeep() methods.
The optimizations in question result in very measurable reduction of the number of database queries, looking up filemetadatas and the related objects in one pass, w/ JOIN-based custom queries, avoiding individual .find()s on 1:1 relations. However, there was strong (if anecdotal?) evidence that this scheme was backfiring on our worst, monster datasets, especially on a busy system. Running this patch at least coincided with a visible reduction in the numbers of crashes.

There is no intent to merge this into main develop. findDeep() appears to be working as intended for most instances; the changes are very quick-and-dirty. Making a draft PR to have these commits in one place for convenient cherry-picking into future prod. patches. (Note however that since this patch was made initially, findDeep() has been removed from the indexing code, during its overall performance optimization/refactoring last summer. Which dramatically improved the indexing of very large datasets specifically.)

I will delete it if/when I think of a cleaner way to maintain these custom mods. (A prodpatch fork is probably the way to go).

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer:

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

… api)

edit: had to resolve a merge conflict when cherry-picking for the 6.7 patch, which was caused by the fact that Jim had already taken findDeep() out of indexDatasetInNewTransaction().
Resolved merge conflicts in
	src/main/java/edu/harvard/iq/dataverse/api/Datasets.java
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.

1 participant