NotASithLord / NotASithLord/peerd

Routine scheduler can fire after a failed durable commit

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
410
Forks
45
Avg merge
11d 5h
Merged PRs (30d)
1

Description

Routine firing advances the next run before it starts unattended work. The scheduler hides a failed storage write. It can then start work without a durable advance. A service-worker restart can repeat the same side effect.

Related storage writes are not ordered. An older write can finish last and restore removed or stale state. Cold-start mutations can also race durable hydration.

Expected behavior:

  • Hydrate state before a mutation.
  • Serialize durable writes.
  • Do not fire if the durable advance fails.
  • Roll back the live schedule and re-arm the alarm after failure.
  • Stop, disable, or remove must prevent a queued fire.
  • Enforce the routine limit after hydration.

Contributor guide

Open the 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.

Research direction

Start at the routine scheduler, durable storage writes, hydration, and service-worker alarm handling described in the issue. Reproduce failed and out-of-order writes, cold-start mutation races, and queued fires after stop or disable. Done means hydration precedes mutation, writes are serialized, failed advances roll back and re-arm the alarm, stopped routines cannot fire, and limits are enforced after hydration.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
distributed-systems, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.