Skip to content

Fix LevelDB descriptor exhaustion and keep error logging recoverable - #1658

Merged
abrignoni merged 1 commit into
mainfrom
fix/fcm-leveldb-file-handles
Oct 7, 2026
Merged

abrignoni merged 1 commit into
mainfrom
fix/fcm-leveldb-file-handles

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

What this changes

Prevents large LevelDB stores from exhausting file descriptors by opening data files per iteration and closing readers on failure. Error logging falls back to the console for EMFILE/ENFILE. Record ordering, repeated passes, and decoding stay unchanged. Refs #1646.

Anything reviewers should know

Regression coverage includes a 64-descriptor limit and failed constructors. The current-main suite passed 1,076 tests (10 skipped), with no new lint warnings. Four real corpus runs preserved all 118,361 exported rows and matched SQLite, TSV, KML, and raw-record comparisons.

Tested on macOS. The reporter's exact Manjaro/F2FS image and native GUI self-check were not tested. An existing invalid table remains unreadable.

Validate tables without retaining their descriptors, reopen one reader per
iteration, and close active readers on exit or construction failure. Keep
EMFILE/ENFILE from turning error logging into a fatal report failure.

Add regression coverage for decoding, repeated passes, ordering, cleanup,
ignored backup files, and actual descriptor exhaustion.

Co-Authored-By: OpenAI Codex (GPT-6) <[email protected]>
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.

1 participant