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

fix(hyperscan): Handles the InvalidError exception during db loading. #181

Merged
merged 1 commit into from
May 23, 2024

Conversation

ERosendo
Copy link
Contributor

This PR introduces logic to handle the InvalidError exception during loading the cached hyperscan db and fixes #4053.

According to the documentation, this error (InvalidError) is only returned when the function detects an invalid parameter. Since loaddb only takes one parameter(the serialized Hyperscan database), this error indicates a problem with the input ByteString. The current fix addresses this by triggering a full database recompile whenever this exception is encountered.

@ERosendo ERosendo requested a review from mlissner May 21, 2024 16:09
@ERosendo ERosendo force-pushed the fix-handle-invalid-error-while-loading-db branch from a72a022 to 667fae5 Compare May 21, 2024 16:20
Copy link
Contributor

The Eyecite Report 👁️

Gains and Losses

There were 0 gains and 0 losses.

Click here to see details.
id Gain Loss

Time Chart

image

Generated Files

Branch 1 Output
Branch 2 Output
Full Output CSV

Copy link
Member

@mlissner mlissner left a comment

Choose a reason for hiding this comment

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

One question. If the answer is no, then I think we can probably merge. If it's "maybe", then let's brainstorm if there's a way to make this a bit better.

eyecite/tokenizers.py Show resolved Hide resolved
@mlissner mlissner merged commit d844d93 into main May 23, 2024
13 checks passed
@mlissner mlissner deleted the fix-handle-invalid-error-while-loading-db branch May 23, 2024 06:29
@mlissner
Copy link
Member

Sounds good, thanks. Merging. We can cut a release if we want or just let it be. This is rare enough, I think we can wait, and I think we have another issue about not recognizing citations that we'll need to pull in soon anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Citation Lookup Failure
2 participants