Skip to content

feat(daemon): using the exp backoff util on metadataDiff#343

Merged
andreabadesso merged 2 commits intomasterfrom
feat/metadataDiff-exp-backoff
Jan 19, 2026
Merged

feat(daemon): using the exp backoff util on metadataDiff#343
andreabadesso merged 2 commits intomasterfrom
feat/metadataDiff-exp-backoff

Conversation

@andreabadesso
Copy link
Copy Markdown
Collaborator

@andreabadesso andreabadesso commented Jan 19, 2026

Motivation

Production incident on 2026-01-18: the daemon crashed with ETIMEDOUT in metadataDiff and required manual restart. The function had no retry logic, so a single transient DB connection timeout could have caused a fatal error.

Acceptance Criteria

  • metadataDiff retries on connection errors (ETIMEDOUT, ECONNREFUSED, ECONNRESET, PROTOCOL_CONNECTION_LOST)
  • Up to 5 retries with exponential backoff (1s → 2s → 4s → 8s → 10s max)
  • Non-retryable errors fail immediately (no unnecessary delays)
  • Error logging includes transaction hash for debugging

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged
  • Make sure either the unit tests and/or the QA tests are capable of testing the new features
  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

@andreabadesso andreabadesso self-assigned this Jan 19, 2026
@andreabadesso andreabadesso added the enhancement New feature or request label Jan 19, 2026
@andreabadesso andreabadesso moved this from Todo to In Progress (Done) in Hathor Network Jan 19, 2026
@pedroferreira1 pedroferreira1 moved this from In Progress (Done) to In Review (WIP) in Hathor Network Jan 19, 2026
@andreabadesso andreabadesso merged commit fb72c84 into master Jan 19, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Jan 19, 2026
@andreabadesso andreabadesso mentioned this pull request Jan 28, 2026
2 tasks
@andreabadesso andreabadesso moved this from Waiting to be deployed to Done in Hathor Network Jan 28, 2026
This was referenced Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants