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

[3.6.x] Catch Exceptions in indexing processes, log warning and continue #5895

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

matthias-ronge
Copy link
Collaborator

If the indexing has a problem reading a METS file, you will get a condition like depicted below, and there is nothing you can do. There is also no additional information displayed as to what is causing this:

Screenshot

Cases in which the index becomes corrupt in a productive environment have become rare, fortunately! But having to rebuild the index, for whatever reason, is associated with downtime in the production environment during which colleagues cannot work. Therefore, I have followed the procedure here when the METS file is missing: An error is now logged and indexing continues for this process without METS data. The error is logged at WARN level, and you can take care of this process manually later.

@solth solth added this to the Kitodo.Production 3.6.2 milestone Jan 25, 2024
Copy link
Member

@solth solth left a comment

Choose a reason for hiding this comment

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

It works and the code looks good.

We do loose the information in the frontend that there is a problem with one (or more) of the processes during indexing, though, but I think that is an acceptable tradeoff for now.

I wonder if in a follow-up improvement we could somehow keep the red x or some other indicator that informs the user/admin to check the log for details. (I would also like to see the detailed exception message in the log; with the change in this pull request it is masked by a generic Cannot read metadata file for indexing message that makes it a little more difficult to resolve potential issues)

But as I said that can be done in a separate pull request and I think the error handling here is a great improvement. Thanks @matthias-ronge

@solth solth removed their assignment Feb 13, 2024
@solth solth merged commit 4086c99 into kitodo:3.6.x Feb 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement search search, filter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants