Generate finding aid results in elasticsearch error "DocumentMissingException"
|Target version:||Release 2.6.0|
|Google Code Legacy ID:||Tested version:|
Primary issue: If a description is not currently indexed in elasticsearch, and a finding aid is generated, the job will fail with the errors:
2019-01-25 01:09 PM 2019-01-25 01:09 PM arFindingAidJob Error Deleting finding aid for: Banff New Media Institute | Exception: DocumentMissingException[[atom_asa_rw] [QubitInformationObject]: document missing] 2019-01-25 01:09 PM 2019-01-25 01:10 PM arFindingAidJob Error Generating finding aid for: Banff New Media Institute | Exception: DocumentMissingException[[atom_asa_rw] [QubitInformationObject]: document missing]
This occurred at a client site. Not sure why the record was not in the ES index. This can be replicated by deleting the ES index, and then generating a finding aid. Once this happens, the background job process will be in error status, and no finding aid will be generated.
Desired behaviour: Ideally the finding aid should still be generated and should not trigger an error. I am unsure why the finding aid task is dependent on the ES index. If this needs to be the case, the job should detect this and error out gracefully with an explanation (run CLI search:populate) on how to fix.
Side affect issue triggered by the job failure:
Once a generate finding aid job has failed, and on the Description "Finding Aid" sidebar it will say "Status: Error", the only options will be "Upload" and "Delete". Selecting either will only reload the current page. To recover the functionality of these UI buttons and generate a new finding aid, the job that has status error for this description must be deleted.
Desired behaviour: The user should not be prevented from re-generating the finding aid when there is a job in error status. Restoring the behaviour of the finding aid links/buttons should not require deleting the job history.