-
Notifications
You must be signed in to change notification settings - Fork 531
IQSS/11776 indexing new files #11779
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
Merged
ofahimIQSS
merged 12 commits into
IQSS:develop
from
QualitativeDataRepository:IQSS-11776-indexing_new_files
Sep 2, 2025
Merged
IQSS/11776 indexing new files #11779
ofahimIQSS
merged 12 commits into
IQSS:develop
from
QualitativeDataRepository:IQSS-11776-indexing_new_files
Sep 2, 2025
Conversation
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
stevenwinship
approved these changes
Sep 2, 2025
Contributor
|
looks good from my end - merging |
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:
Which issue(s) this PR closes:
Special notes for your reviewer: This was tricky - the original code defined the query as returning Long file ids, but a) the database decided to send Integers anyway, and b) this then caused
changedFileMetadataIds.contains(fileMetadata.getId())to fail even with a numeric match (Long(1) != Integer(1)). That failure made it look like the file was the same in the released and draft versions, which we would not reindex (unless there was a variable-level metadata change).The fix changes to return the file Ids as Integers - that should be a no-op, but may stop someone from assuming Long, and then checks the class returned from the query to assure Longs are getting into the changedFileMetadataIds array. I also added a warning if `changedFileMetadataIds.contains(fileMetadata.getId()) == false while the fileMap entry for the file is null (line 1531) which means the file wasn't in the released version (this shouldn't happen if the query and changedFileMetadataIds works as it should).
Suggestions on how to test this: There's an IT test - you should be able to add a dataset, publish, add a file, and verify you can't find the datafile via search or use the index/status api call and see that the file is in the db and not indexed. After the PR, this should be fixed (can recreate a new dataset or just reindex the existing one (by changing the dataset metadata for example).
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?: added
Additional documentation: