Experimental: build the application without using findDeep() methods#12148
Draft
Experimental: build the application without using findDeep() methods#12148
Conversation
… 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
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.
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:
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: