Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

writeDraftCheckpoint OCC can lose a crash-recovery checkpoint under concurrent checkpointing

Closed
#358 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
57/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
database

Research direction

Start in writeDraftCheckpoint in src/storage/memory.ts around lines 639-650, and trace how atomicWrite reports ECONFLICT and how isConflictError is used elsewhere in the same file. The checkpoint path currently lets that error propagate instead of re-reading the fingerprint and retrying. Done means a conflicting checkpoint write retries and succeeds, and a concurrent DRAFT-S-* checkpoint is no longer lost.

Written by the indexing model from the issue text.

Description

bug core priority: low

Location: src/storage/memory.ts:639-650

Two writers checkpointing the same DRAFT-S-* id read the same fingerprint; the second gets ECONFLICT from atomicWrite, which is not caught here and propagates. The checkpoint write - whose purpose is to prevent data loss on unexpected exit - is the thing lost.

Fix: Retry on isConflictError (re-read fingerprint and rewrite) for the checkpoint path.

From the 2026-10-10 codebase audit sweep (CODEBASE_AUDIT.md).

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
22h 21m
Merged PRs (30d)
167

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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 Kuldeep2822k/cli

All issues in Kuldeep2822k/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.