Skip to content

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Aug 29, 2025

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:

@qqmyers qqmyers added this to the 6.8 milestone Aug 29, 2025
@qqmyers qqmyers moved this to Ready for Triage in IQSS Dataverse Project Aug 29, 2025
@qqmyers qqmyers added Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug - Blocker Bug is blocking user work, no workaround available Type: Bug a defect and removed Type: Bug - Blocker Bug is blocking user work, no workaround available labels Aug 29, 2025
@coveralls
Copy link

coveralls commented Aug 29, 2025

Coverage Status

coverage: 23.458% (-0.004%) from 23.462%
when pulling ec3c274 on QualitativeDataRepository:IQSS-11776-indexing_new_files
into 6275ea9 on IQSS:develop.

@ofahimIQSS ofahimIQSS moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Sep 2, 2025
@stevenwinship stevenwinship self-assigned this Sep 2, 2025
@stevenwinship stevenwinship moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Sep 2, 2025
@github-project-automation github-project-automation bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Sep 2, 2025
@stevenwinship stevenwinship removed their assignment Sep 2, 2025
@ofahimIQSS ofahimIQSS self-assigned this Sep 2, 2025
@ofahimIQSS ofahimIQSS moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Sep 2, 2025
@ofahimIQSS
Copy link
Contributor

looks good from my end - merging

@ofahimIQSS ofahimIQSS merged commit 338dfa2 into IQSS:develop Sep 2, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Sep 2, 2025
@ofahimIQSS ofahimIQSS removed their assignment Sep 2, 2025
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

New files in later versions not being indexed

4 participants