Skip to content
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/11069 fix index status query #11072

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Dec 6, 2024

What this PR does / why we need it: This PR fixes the query used in the admin/index/status API call. A last minute change to the query in #10710 added during review used a feature only allowed in native queries. The change in this PR adapts the query to use native syntax to fix the /index/status call.

It also fixes two other issues that can break the status call and indexing in general for single value fields used with a cvoc script. In both cases, an 'else if' is needed rather than a 'if' in the code. In the status case this resulted in a null pointer exception when orphan permission docs exist. In the latter, two code sections were adding the same field to the solr document. With a single/non-multi field (e.g. depositor) this resulted in multiple values in a single-value solr field.

Which issue(s) this PR closes:

Special notes for your reviewer: The PR also drops some per-file logging to finest to simplify debugging.

Suggestions on how to test this: Try the api/admin/index/status call, verify that it completes and provides a report in the server.log. For the orphan permission error - there shouldn't be a null pointer reported in server.log when there are orphan permission docs. If your repository doesn't have any, I'm not sure it's worth trying to generate them. For the cvoc error, I think the external cvoc config in use on demo, which should have the depositor field associated with the ORCID script, should show the problem. (The problem doesn't appear in v6.4 for some reason afaik, but some change in 6.5 has surfaced the issue.) In addition to seeing the dataset indexed when a depositor entry exists, you can also look for any logs in the logs/process-failures subdirectory. There should not be any related to the dataset being tested.)

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:

@ofahimIQSS
Copy link
Contributor

Adding server.log file
server.log --- 1.txt

Copy link
Contributor

@landreev landreev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All makes sense.

@landreev landreev removed their assignment Dec 9, 2024
@scolapasta scolapasta added this to the 6.5 milestone Dec 10, 2024
@ofahimIQSS ofahimIQSS self-assigned this Dec 10, 2024
@ofahimIQSS
Copy link
Contributor

Fix looks good, no issues encountered during testing.
11069 server.log

@ofahimIQSS ofahimIQSS merged commit 206d8f0 into IQSS:develop Dec 10, 2024
11 checks passed
@ofahimIQSS ofahimIQSS removed their assignment Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🧹
Development

Successfully merging this pull request may close these issues.

Error When Accessing /api/admin/index/status Endpoint
4 participants