Repository navigation
fix: slow indexing of datasets with many external vocabulary terms - #12767
Merged
landreev merged 1 commit intoOct 2, 2026
Merged
Conversation
With flush mode AUTO the index job checked all loaded entities for changes before each term lookup. The job never changes them, so COMMIT is safe. Refs: IQSS#12765
Member
|
@akeldamas thanks for the pull request! I kicked off a thread in our internal Slack to talk about. I also requested a review from @ErykKul. |
ErykKul
approved these changes
Oct 1, 2026
ErykKul
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, nice find. Checked that nothing in that transaction writes, so COMMIT mode is safe there.
Member
|
It looks like @ErykKul has cherry-picked c00cfff from this PR by @akeldamas into a new PR Eryk made: |
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:
Since #12712 the background index job loads its own copy of the dataset. For every external vocabulary term it runs a database query to look up the label. Because the flush mode is AUTO, EclipseLink first checks the whole dataset for changes before each of those queries. With thousands of terms, indexing takes minutes instead of seconds.
The job only reads, so there is nothing to flush. I set the flush mode of its transaction (
IndexServiceBean.indexDatasetNow) to COMMIT, which skips those checks. The index time is still written in its own transaction, as before.Which issue(s) this PR closes:
Special notes for your reviewer:
Suggestions on how to test this:
Use the files attached to #12765. Set
cvocconf.jsonas:CVocConf, create a dataset fromdataset-4000-keywords.jsonand time how long it takes until it's indexed. On develop that took 168.9 seconds for me, with this change 3.3 seconds (6.12: 1.1 seconds).The unit tests pass. I added a test to
IndexingAfterCommitTestthat checks the job sets the flush mode before it loads the dataset.Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No.
Is there a release notes update needed for this change?:
No. It fixes a regression that hasn't been released yet. If #12712 ships in 6.12.1, this should ship with it.
Additional documentation:
None.