Skip to content

Truncate cache filenames and rename empty TF-IDF counter#609

Open
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/cache-filename-and-tfidf-counter-rename
Open

Truncate cache filenames and rename empty TF-IDF counter#609
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/cache-filename-and-tfidf-counter-rename

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • Truncate URL and ETag SHA256 hashes to 16 hex chars in url_to_filename() to avoid OSError: File name too long on eCryptfs/encfs filesystems
  • Rename number_of_non_empty_tfidfs to number_of_empty_tfidfs to match what the variable counts

Issues addressed

Fixes #590, #593

Test plan

  • Verify cached filenames stay under encrypted filesystem limits
  • Confirm TF-IDF index creation still prints correct empty-vector counts

Made with Cursor

Shorten URL/ETag hashes in cached filenames to avoid OSError on
eCryptfs/encfs filesystems, and rename number_of_non_empty_tfidfs to
number_of_empty_tfidfs to match what it counts.

Fixes allenai#590 and allenai#593.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

fix: truncate cache filenames to avoid OSError on eCryptfs/encfs filesystems

1 participant