Skip to content

Address ls "no cached counter a found" 500 errors - #245

Merged
moseshll merged 4 commits into
mainfrom
ETT-1368_no_cached_counter_a
Aug 7, 2026
Merged

Address ls "no cached counter a found" 500 errors#245
moseshll merged 4 commits into
mainfrom
ETT-1368_no_cached_counter_a

Conversation

@moseshll

@moseshll moseshll commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
  • As noted in an added comment, a search with no results can precipitate this error
  • I believe it likely that only zero-results queries cause it.
  • Trying to recover the counter is pointless because the interleaver (which is the source)
    is never invoked.
  • It is okay to leave counter a uninitialized because there is nothing to count.
  • Hence, the ASSERT was removed. User will get "no results" instead of 500.

I've added a basic unit test file. It includes a test for the condition in question, which dies if the ASSERT is put back in place.

Minor reformatting also done.

Reviewer

This is staged on dev-2. Compare

https://babel.hathitrust.org/cgi/ls?q1=zxcvbnmmm&field1=ocr&a=srchls&ft=ft&lmt=ft&pn=3

vs

https://dev-2.babel.hathitrust.org/cgi/ls?q1=zxcvbnmmm&field1=ocr&a=srchls&ft=ft&lmt=ft&pn=3

You can make up your own production crasher for comparison as long as the pn page number parameter is =3 or more, either with a no-results query or for example you could edit a facet like facet=language008_full:"French Dressing". Have fun!

- As noted in an added comment, a search with no results can precipitate this error
- I believe it likely that only zero-results queries cause it.
- Trying to recover the counter is pointless because the interleaver (which is the source)
  is never invoked.
- It is okay to leave counter a uninitialized because there is nothing to count.
- Hence, the ASSERT was removed. User will get "no results" instead of 500.
@moseshll
moseshll requested a review from carylwyatt August 5, 2026 18:31

@carylwyatt carylwyatt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me! Thanks to your detailed instructions, this was very easy to test. Great work. 🚀

@moseshll
moseshll merged commit b4397db into main Aug 7, 2026
3 checks passed
@moseshll
moseshll deleted the ETT-1368_no_cached_counter_a branch August 7, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants