Improve error handling for Solr failures in dataone-indexer
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with IndexWorker:indexObject and HTTPService:sendUpdate, the entry points named in the example stack traces, and trace how unreachable Solr, non-200 responses, and missing component IDs are handled. Review the reported failure cases and define an explicit retry, status, ordering, and user-feedback behavior; done means failed indexing is no longer silent or leaves datasets appearing broken.
Written by the indexing model from the issue text.
Description
Problem
Currently, the dataone-indexer does not robustly handle failures when it cannot update Solr. When the indexer encounters an error (such as Solr being unreachable, a non-200 HTTP response, or missing component IDs), it simply fails silently. As a result, datasets can appear broken in the UI after a user saves them (e.g., missing resource maps), causing confusion and potentially impacting data integrity and discoverability.
Example Errors
dataone-indexer 20250522-16:07:00: [ERROR]: Cannot index the task for identifier ess-dive-16a147be33ae867-20250522T160057790 since ess-dive-solr-20250514-headless: Temporary failure in name resolution [org.dataone.cn.indexer.IndexWorker:indexObject:486]
[org.dataone.cn.indexer.solrhttp.HTTPService:sendUpdate:128]
2025-05-22T17:43:52.563136477Z dataone-indexer 20250522-17:43:52: [ERROR]: Cannot index the task for identifier ess-dive-7437c9c521814a2-20250522T173903944 since unable to update solr, non 200 response code. { "status":500, "error":{"root-error-class":"org.apache.zookeeper.KeeperException$SessionExpiredException"}}
2025-05-22T17:19:42.164060793Z dataone-indexer 20250522-17:19:42: [ERROR]: Cannot index the task for identifier ess-dive-a6017243efc80c5-20250522T171913973 since Solr index doesn't have the information about the id ess-dive-16a147be33ae867-20250522T160057790 which is a component in the resource map ess-dive-a6017243efc80c5-20250522T171913973. Metacat-Index can't process the resource map prior to its components. [org.dataone.cn.indexer.IndexWorker:indexObject:486]
...
Desired Behavior
- Solr indexing failures should not result in datasets being left in a broken state in the UI.
- The indexer should implement better error handling, such as:
- Retrying failed Solr updates with exponential backoff.
- Marking datasets with an explicit error or pending status if indexing fails.
- Logging actionable errors and optionally notifying users/admins about indexing issues.
- Ensuring resource maps are only processed after all components have been indexed successfully.
- Users should receive clear feedback if their dataset is not fully indexed due to backend issues, rather than the dataset appearing as missing or broken.
Impact
Improved error handling for Solr interactions in the dataone-indexer will reduce user confusion, preserve data integrity, and help maintain trust in the system when backend issues occur.
Filed by: @vchendrix
Date: 2025-05-22
- Dominant language
- Java
- Stars
- 0
- Forks
- 2
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DataONEorg/dataone-indexer
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DataONEorg/dataone-indexer#390 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DataONEorg/dataone-indexer#378 ·
-
K8s
Difficulty 4/5 3-5 days Newbie friendliness 38/100
DataONEorg/dataone-indexer#377 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
DataONEorg/dataone-indexer#362 · 8 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
DataONEorg/dataone-indexer#357 ·
All issues in DataONEorg/dataone-indexer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
finos/rune-common#819 ·
Maintainers usually reply within 1 day
-
enhancement good first issue storege-module
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
sdlc-pro/spring-lens#647 ·
Maintainers usually reply within 1 day
-
lang-java needs-triage package:jni package:jni_flutter package:jnigen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
valkey-io/valkey-glide#7975 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day