Resiliency: Infrastructure Backoff & Best-Effort Release

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, typescript
Domain
backend

Research direction

The work centers on LockCoordinator lock acquisition and the cleanup-block releaseLock call; it is blocked by issue #126. Start by locating those entry points, then use undici MockAgent with vi.useFakeTimers() to verify exponential backoff for 5xx and timeout failures, and confirm releaseLock network errors are swallowed without an unhandled exception.

Written by the indexing model from the issue text.

Description

enhancement
Description

Fortify the LockCoordinator with infrastructure backoffs and best-effort cleanup logic. If the config-server returns 5xx infrastructure errors or network timeouts during lock acquisition, the SDK must back off exponentially (e.g., 1s, 2s, 4s, 8s) to protect the backend. Additionally, the final releaseLock execution within the cleanup block must silently swallow network errors, ensuring that transient cleanup failures do not crash the successfully updated Node process.

Acceptance criteria
  • Simulating a 5xx error or network timeout during lock acquisition triggers exponential backoff (verified via undici MockAgent and vi.useFakeTimers()).

  • Simulating a network error during the releaseLock call successfully catches and swallows the error without throwing an unhandled exception to the main Node process.

Blocked by

Issue #126

User stories covered: 8, 9

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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 MapColonies/config

All issues in MapColonies/config

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.