Skip to content

Catch MDB_BAD_VALSIZE in LMDBStore.put to prevent unhandled rejections - #654

Open
vzhan00 wants to merge 1 commit into
mainfrom
fix/lmdb-bad-valsize-unhandled-rejection
Open

Catch MDB_BAD_VALSIZE in LMDBStore.put to prevent unhandled rejections#654
vzhan00 wants to merge 1 commit into
mainfrom
fix/lmdb-bad-valsize-unhandled-rejection

Conversation

@vzhan00

@vzhan00 vzhan00 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

LMDBStore.put() now catches MDB_BAD_VALSIZE errors and logs + skips the write (returns false) instead of letting the rejection propagate unhandled.

Testing

  • New unit tests in tst/unit/datastore/LMDB.valueSize.test.ts: skip-gracefully on MDB_BAD_VALSIZE, no unhandled rejection, unrelated errors still throw, normal-sized puts unaffected.
  • Full tst/unit/datastore suite passes (181 tests).
  • npx eslint clean on both changed files.

@vzhan00
vzhan00 requested a review from a team as a code owner July 29, 2026 18:30
@github-code-quality

github-code-quality Bot commented Jul 29, 2026

Copy link
Copy Markdown

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/vitest

The overall coverage in commit 19f3660 in the fix/lmdb-bad-valsize... branch remains at 91%, unchanged from commit 4494c11 in the main branch.

Show a code coverage summary of the most impacted files.
File main 4494c11 fix/lmdb-bad-valsize... 19f3660 +/-
src/datastore/Utils.ts 100% 100% 0%
src/datastore/l...db/LMDBStore.ts 93% 94% +1%

Updated July 31, 2026 17:40 UTC

@vzhan00
vzhan00 force-pushed the fix/lmdb-bad-valsize-unhandled-rejection branch from 5dca91c to 19f3660 Compare July 31, 2026 17:34
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