Cover commitSync() error precedence through the public Transaction wrapper

Open Beginner friendly
#1,118 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js
Domain
databases, testing

Research direction

Read #1103 first because it also changes commitSync() shutdown assertions. Then inspect test/fixtures/fork-commit-sync-shutdown.mts and the public Transaction wrapper; add a sync mode that checks commit error precedence during a foreign shutdown. Done when the test fails if shutdown replaces the commit error with “Database not open” and passes for the expected precedence.

Written by the indexing model from the issue text.

Description

Problem

The wrapper-level test for #1100 covers only async Transaction.commit() (test/fixtures/fork-commit-admission-shutdown.mts). commitSync() shares the same error-precedence code, but no test fails if it regresses: a foreign shutdown() during commitSync() would again replace the commit's error with "Database not open".

Possible direction

Add a sync mode through the public Transaction wrapper to test/fixtures/fork-commit-sync-shutdown.mts (it currently tolerates both errors with a regex). Check #1103, which also touches commitSync() shutdown assertions, first.

Review-Deferral: 4306852a8a0513a6 severity=minor category=test-coverage

🤖 Generated by Anthropic Claude (Sonnet 5.5); posted via @cb1kenobi.

Dominant language
C++
Stars
24
Forks
3
Avg merge
1d 17h
Merged PRs (30d)
94

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HarperFast/rocksdb-js

All issues in HarperFast/rocksdb-js

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.