-
Notifications
You must be signed in to change notification settings - Fork 494
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
IQSS/10814 Improve dataset version differencing #10818
Open
qqmyers
wants to merge
9
commits into
IQSS:develop
Choose a base branch
from
GlobalDataverseCommunityConsortium:IQSS/10814-Improve_dataset_version_differencing
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
IQSS/10814 Improve dataset version differencing #10818
qqmyers
wants to merge
9
commits into
IQSS:develop
from
GlobalDataverseCommunityConsortium:IQSS/10814-Improve_dataset_version_differencing
Conversation
This file contains 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
qqmyers
added
GDCC: DANS
related to GDCC work for DANS
GDCC: QDR
of interest to QDR
labels
Aug 29, 2024
qqmyers
added
the
Consider For Next Release
A simple change (eg bug fix) that would be good to prioritize since it has been seen in the wild
label
Sep 25, 2024
…ataset_version_differencing
…ataset_version_differencing
sekmiller
reviewed
Nov 13, 2024
src/main/java/edu/harvard/iq/dataverse/DatasetVersionDifference.java
Outdated
Show resolved
Hide resolved
sekmiller
approved these changes
Nov 13, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this looks good. thanks for the typo fix.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Consider For Next Release
A simple change (eg bug fix) that would be good to prioritize since it has been seen in the wild
FY25 Sprint 10
FY25 Sprint 10 (2024-11-06 - 2024-11-20)
GDCC: DANS
related to GDCC work for DANS
GDCC: QDR
of interest to QDR
Size: 3
A percentage of a sprint. 2.1 hours.
Type: Feature
a feature request
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: The change in this PR makes differencing during the UpdateDatasetVersionCommand for a dataset with 10K files go from taking ~ 8 seconds to <4 seconds (cold start) or even 17 ms (when the info in the versions has been read before). Presumably it improves the Version table on the dataset as well though I haven't tested that at scale.
The PR also includes some cleanup of the terms comparison - basically folding the possible null TermsOfUseAndAccess on the original or new version cases into one case by creating an empty TermsOfUseAndAccess for whichever one is missing, and adding a method to reduce repeated code.
Which issue(s) this PR closes:
Special notes for your reviewer: The test currently tests against the original algorithm and against a hardcoded expected value in the test. There's no real reason to test against the original algorithm except to validate that the hardcoded expected values in the test are correct, so I've marked the test code doing the check against the original as @deprecated.
The current tests don't do anything to test scaling (they basically try adding one file in each category (changed metadata, changed variable-level metadata, added file, deleted file, replaced file) and see if they differences are calculated as expected/as before. If someone wants to add a loop with ~1K files, we could probably start seeing the difference.
Suggestions on how to test this: QA should probably both confirm that the differencing appears to work for the Unit test cases (add a version or two and change metadata, add a file, delete a file, replace a file between versions) and make sure the difference makes sense. Checking the changed variable-level metadata probably requires testing with a tab file and perhaps editing with the DataCurator (Borealis tool for editing variable metadata) or editing in the db.
Scalability can be estimated by finding/creating a published dataset with several K files and checking the time to load the version table. (Maybe there's an API call?) I think all we need is to verify this is much faster/ worth the effort. (I added logging statements to print the start/stop times before/after the new/old algorithms and then ran the code on a dataset with 10K files. I've left a timing statement for the new algorithm in for fine logging, but the original code doesn't have any.)
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?: included - not sure it is needed, but perhaps as part of a general improved scalability note for multiple PRs.
Additional documentation: