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

Coordinated retry: a park timeout uses up the retry budget and cannot be told apart from a lost conflict

Open
#907 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
cpp, node.js
Domain
backend, databases

Research direction

Read src/database.ts around coordinatedRetry and transaction.cpp around the park-timeout default; also review the related issue #744. First decide which retry-budget behavior should apply, then determine how to expose a distinguishable timeout signal. Done means the chosen behavior and signal are implemented and tested, but this issue does not name specific test files.

Written by the indexing model from the issue text.

Description

Coordinated retry: a park timeout uses up the retry budget and cannot be told apart from a lost conflict

What happens

coordinatedRetry in src/database.ts (around lines 1175-1220 on main 1b165e094) parks a conflicting transaction until the lock holder wakes it, or until the park timeout fires. The default timeout is 5000 ms (transaction.cpp, around line 252). Both outcomes come back as RETRY_NOW, and both use up one of the maxRetries attempts (default 3).

Two results:

  1. Budget. A holder that is slow but alive, for example a long write transaction holding the record for more than about 15 s, uses up all retries through timeouts alone. The waiter then fails with did not commit after N coordinated retries, although no conflict was ever lost.
  2. Signal. No event, error code or error detail says that the retries ended through park timeouts rather than through repeated lost conflicts. A grep of src/*.ts finds no park-timeout event. An operator who sees the error cannot tell "the holder is stuck" from "the record is under heavy contention".
Decision needed

Choose which of these should happen:

  • (a) Timeout wakes still count against maxRetries, but the final error states how many attempts ended in a park timeout. This is the smallest change.
  • (b) Timeout wakes get their own budget, or a total wall-clock deadline, separate from conflict retries.
  • (c) Keep the current behavior and document it next to maxRetries and the park timeout option.

Whatever is chosen, emit a distinguishable signal (an event or error property) when a park times out, so Harper can log it.

Related
  • #744 added the park timeout (merged 2026-08-25).
  • The holder-leak shape that makes long parks likely is harper#2001.
  • Wake-callback deregistration (LockTracker::wakeCallbacks has no removal API) is being handled separately as a dispatch fix.
Dominant language
C++
Stars
24
Forks
3
Avg merge
1d 7h
Merged PRs (30d)
49

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.